Skip to content

Commit 541f80a

Browse files
committed
Reinstate closures.brat accidentally zapped by #117
1 parent 7bd9b9a commit 541f80a

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,17 @@
11
f(Nat) -> { Nat -> Nat }
22
f(x) = { y => x + y }
3+
4+
g(Nat) -> { Nat -> { Nat -> Nat } }
5+
g(x) = { y => { z => x + y + z } }
6+
7+
8+
h(Nat) -> { Nat -> Nat }
9+
h(x) = let y = x in { z => x + y + z }
10+
11+
ff(Vec(Nat,2)) -> { Nat -> Nat }
12+
ff([a,b]) = { y => a + b*y }
13+
14+
ext "to_float" i2f :: {Int -> Float}
15+
16+
fi(Float) -> { Int -> Float }
17+
fi(x) = { y => x + i2f(y) }

0 commit comments

Comments
 (0)