From 720372e3deac26a064fb1c711db2ccf54e655fab Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sat, 17 Feb 2024 12:04:53 +0100 Subject: Lots of parser work --- examples/test1.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'examples/test1.hs') 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 [] -- cgit v1.2.3-70-g09d2