Created
December 23, 2016 21:23
-
-
Save deque-blog/a920ff1bbcfa3855c26a9cb66ce97518 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
treeWalkR :: Tree a -> [a] | |
treeWalkR EmptyTree = [] | |
treeWalkR (Tree root) = treeWalkR' root | |
treeWalkR' :: Node a -> [a] | |
treeWalkR' (Node v children) = v : concatMap treeWalkR' children |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment