blob: 311b65c4e1dbc9e3fc746c6a3891ee85c1f08644 (
plain)
1
2
3
4
5
6
7
8
9
10
|
data Tree a = Node (Tree a) (Tree a)
left (Node x y) = x
right (Node x y) = y
choose (Node (Node _ _) (Node _ _)) = "hello world!\n"
mk f = f (mk f) (mk f)
main = putStr (choose (mk Node))
|