We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7bd9b9a commit 541f80aCopy full SHA for 541f80a
1 file changed
brat/test/compilation/closures.brat
@@ -1,2 +1,17 @@
1
f(Nat) -> { Nat -> Nat }
2
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