Advertisement
Guest User

Untitled

a guest
Jun 4th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. collectLeafs :: X a b -> [a]
  2. collectLeafs (Unit a) = [a]
  3. collectLeafs (Comp b c d) = collect c ++ collect d
  4.  
  5. collectLeafs :: X a b -> [a]
  6. collectLeafs = cataL2D( either singl f)
  7.     where f(Comp b c d) = conc(f c, f d)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement