Advertisement
JoelSjogren

Untitled

Jun 14th, 2020
1,702
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. data Tree a = Leaf a | Branch (Tree a) (Tree a)
  2.  
  3. unit :: a -> Tree a
  4. unit = Leaf
  5.  
  6. join :: Tree (Tree a) -> Tree a
  7. join (Leaf a) = a
  8. join (Branch r s) = Branch (join r) (join s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement