Issue #18764 has been updated by Henrik Lindberg.

Project changed from Standard Library to Puppet
Category set to language
Status changed from Investigating to Needs Decision
Priority changed from Normal to Immediate
Parent task set to #11331

Update, this issue is covered by ARM-2.iteration.

In contrast to #11331 which is now about the implementation supporting 
iterative/enumerable functions, this issue is about the functions themselves.


----------------------------------------
Feature #18764: Add support for enumerable methods/functions
https://projects.puppetlabs.com/issues/18764#change-87467

* Author: Henrik Lindberg
* Status: Needs Decision
* Priority: Immediate
* Assignee: 
* Category: language
* Target version: 
* Affected Puppet version: 
* Keywords: collections functions language
* Branch: 
----------------------------------------
With the addition of lambdas/methods in #11331 it is very simple to also add 
support for additional operations on "collections" (arrays and hashes).
As an example, this would select all strings in the array $a that ends in 
".com":
<pre>
$dot_com_strings = $a.select {|$x| = $x =~ /\.com$/ }
</pre>

Propose that the following are added:

* collect
* select
* reject
* reduce
* count / length / size
* all
* any - this is a variant on the explicit "in" operator


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to