Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Deliberately monomorphic: assume no Traversable instance for subtrees
- data IntTree = Leaf Int | Branch IntTree IntTree
- children :: Traversal' IntTree IntTree
- leaves :: Traversal' InTTree Int
- allLeaves :: Traversal' IntTree Int
- allLeaves = leaves ??? (children . allLeaves)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement