aboutsummaryrefslogtreecommitdiff
path: root/examples/test1.hs
blob: 6acbedab77d7fe1874ff802ecfd792648c13fe65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 =
  let go [] acc = acc
      go (x:xs) acc = go xs (x:acc)
  in \l -> go l []