aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-02-17 12:04:53 +0100
committerTom Smeding <tom@tomsmeding.com>2024-02-17 12:04:53 +0100
commit720372e3deac26a064fb1c711db2ccf54e655fab (patch)
treeaa721469e4c12f28d7b5c630e2d807bee63c9899 /examples
parent3faca807fe96f2cefa50023fe373d8bcf1430121 (diff)
Lots of parser work
Diffstat (limited to 'examples')
-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 []