Returns a single sequence containing all elements loadElements recursively provides for the elements of the original sequence as well as the elements itself if dropRoots = false is specified. The operation is intermediate and stateless.
For instance, in case of a tree structure, loadElements loads the children, in case of a graph the connected nodes. The order in which the elements are returned depends on the chosen traversalAlgorithm as well as dropRoots. (consult the documentation of the options to get more information).
Since
1.1.0
Parameters
the type of the elements in the sequence.
If set to true (default false), we no longer track visited elements and will re-loadElements in case of a revisit, potentially turning this into an infinite loop. Use this option only if you know that there aren't any cycles or in case the loadElements function is not referentially transparent, i.e. outcome might depend on other factors not only on input.
if set to false (default true) the resulting sequence also includes the elements of the original sequence.
the function returning the children of a given element in case of a tree / the connected nodes in case of a graph.
Returns a single sequence containing all elements loadElements recursively provides for the elements of the original sequence as well as the elements as such if dropRoots = false is specified. The operation is intermediate and stateless.
For instance, in case of a tree structure, loadElements loads the children, in case of a graph the connected nodes. The order in which the elements are returned depends on the chosen traversalAlgorithm as well as dropRoots. (consult the documentation of the options to get more information).
Since
1.1.0
Parameters
the type of the elements in the sequence.
If set to true (default false), we no longer track visited elements and will re-loadElements in case of a revisit, potentially turning this into an infinite loop. Use this option only if you know that there aren't any cycles or in case the loadElements function is not referentially transparent, i.e. outcome might depend on other factors not only on input.
if set to false (default true) the resulting sequence also includes the elements of the original sequence.
the function returning the children of a given element in case of a tree / the connected nodes in case of a graph.