aboutsummaryrefslogtreecommitdiff
path: root/examples/test1.hs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/test1.hs')
-rw-r--r--examples/test1.hs10
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 []