diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/test1.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/examples/test1.hs b/examples/test1.hs index 083a876..6acbeda 100644 --- a/examples/test1.hs +++ b/examples/test1.hs @@ -4,5 +4,13 @@ data Tree a foo = 1 bar = 1 + 2 +f :: Int -> Int f x = x * 3 -g y = f (y - 2) + 7 +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 [] |