Project

General

Profile

Actions

Feature #17312

closed

New methods in Enumerable and Enumerator::Lazy: flatten, product, compact

Added by zverok (Victor Shepelev) 12 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:100753]

Description

(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.


Related issues

Related to Ruby master - Feature #16987: Enumerator::Lazy vs Array methodsOpenActions
Actions

Also available in: Atom PDF