forked from solstice/solstice
Type parser
This commit is contained in:
9
tests/closure.sols
Normal file
9
tests/closure.sols
Normal file
@@ -0,0 +1,9 @@
|
||||
def createClosure(int x) fun(int) int {
|
||||
return lambda(int y) int {
|
||||
x + y
|
||||
}
|
||||
}
|
||||
|
||||
myVar = createClosure(5)
|
||||
|
||||
puts myVar(3)
|
||||
Reference in New Issue
Block a user