fluent-traversable icon indicating copy to clipboard operation
fluent-traversable copied to clipboard

possible to do recursive mapping?

Open gvanbeck opened this issue 10 years ago • 1 comments

like traversing a data-tree? say objects with children properties.

gvanbeck avatar Sep 29 '15 10:09 gvanbeck

You can use spl's RecursiveIteratorIterator as argument of FulentTraversable::create method, but the toArray output will be flat array.

Mapping over tree is this way, that result of mapping is a tree with changed leafs is not supported by this library.

psliwa avatar Sep 29 '15 17:09 psliwa