| tree_each function returns an iterator, which is supposed to chain with revers_each, filter, map and reduce according to the documentation In practice one of the chained functions, reduce does not work. The minimal code to reproduce with puppet apply:
$tree = {} |
notice $tree.tree_each.reduce({}) |$m, $v| { $m } |
This results in an error:
Error: Evaluation Error: Error while evaluating a Method call, undefined method `reduce' for #<Puppet::Pops::Types::Iterable::DepthFirstTreeIterator:0x00005653899c8280> |
Did you mean? rescue (file: /srv/production/site/profile/manifests/test.pp, line: 2, column: 30) on node ruthenium-dev |
joshalso |