Issue #18764 has been updated by Matthaus Owens. Status changed from Merged - Pending Release to Closed
Released in Puppet 3.2.0-rc1 ---------------------------------------- Feature #18764: Add support for enumerable methods/functions https://projects.puppetlabs.com/issues/18764#change-89600 * Author: Henrik Lindberg * Status: Closed * Priority: Immediate * Assignee: * Category: language * Target version: 3.2.0 * 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.
