aboutsummaryrefslogtreecommitdiff
path: root/examples/test1.hs
blob: 2a3a8341b040fe3baa7f60b1ad8339f9304a51cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
data Tree a
  = Node (Tree a) a (Tree a)
  | Leaf

foo = 1
bar = 1 + 2
f :: Int -> Int
f x = x * 3
g :: Int -> ((Int -> Int) -> (Int -> Int)) -> Int
g y ding = ding f (y - 2) + 7

reverse :: [a] -> [a]
reverse l =
  let go [] acc = acc
      go (x:xs) acc  go xs (x:acc) 7 ->
  in go l []

kaas = 42