Open SusanDoggie opened 2 years ago
Is a "recursive mapped sequence" a term of art for a particular structure? I've never heard of it before, and the documentation so far assumes you pretty much already know. A quick web search found something related using the Python language; is the code here supposed to be a Swift adaptation of the Python code?
The concept seems to be a way to do tree traversal without that type having to provide its own depth- and breath-first iterators; you just have to supply a function to map an element to a Sequence
of its children, and this function takes care of the rest.
Is a "recursive mapped sequence" a term of art for a particular structure? I've never heard of it before, and the documentation so far assumes you pretty much already know. A quick web search found something related using the Python language; is the code here supposed to be a Swift adaptation of the Python code?
The concept seems to be a way to do tree traversal without that type having to provide its own depth- and breath-first iterators; you just have to supply a function to map an element to a
Sequence
of its children, and this function takes care of the rest.
This method is simplified recursive CTE, which can map a hierarchical table to a linear sequence.
I don’t known what’s the name of this operation. So I call it recursive map.
add
recursiveMap()
method.Checklist