Jump to content

Tree from nesting levels: Difference between revisions

m
Line 126:
:# a generic ''forestFromNestLevels'' function to map from a normalised input list to a generic tree, and
:# a standard catamorphism over trees (''foldTree'') to generate both the nested list format, and the round-trip regeneration of a sparse list from the generic tree.
<lang applescript>----------------- FOREST FROM NEST LEVELS ----------------
----------------- FOREST FROM NEST LEVELS ----------------
 
-- forestFromNestLevels :: [(Int, a)] -> [Tree a]
9,655

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.