aboutsummaryrefslogtreecommitdiff
path: root/examples/test1.hs
blob: 7bd2ee3ebfdeb34daa21bc06b0cb65f09bd97f2c (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)
  in go l []

kaas = 42