From: petrik@... Date: 2020-11-18T15:31:55+00:00 Subject: [ruby-core:100934] [Ruby master Feature#17312] New methods in Enumerable and Enumerator::Lazy: flatten, product, compact Issue #17312 has been updated by p8 (Petrik de Heus). I was really suprised that #last isn't implemented in Enumerable while #first is. ---------------------------------------- Feature #17312: New methods in Enumerable and Enumerator::Lazy: flatten, product, compact https://bugs.ruby-lang.org/issues/17312#change-88588 * Author: zverok (Victor Shepelev) * Status: Open * Priority: Normal ---------------------------------------- (The offspring of #16987, which was too vague/philosophical) I propose to add to `Enumerable` and `Enumerator::Lazy` the following methods: * `compact` * `product` * `flatten` All of them can be performed with a one-way enumerator. All of them make sense for situations other than "just an array". All of them can be used for processing large sequences, and therefore meaningful to add to `Lazy`. -- https://bugs.ruby-lang.org/ Unsubscribe: