38 lines
446 B
Plaintext
38 lines
446 B
Plaintext
|
|
let printer = lambda (pfx):
|
|
return lambda (msg):
|
|
@print(pfx)
|
|
@print(msg)
|
|
end
|
|
end
|
|
|
|
let pr = printer("This is a func call")
|
|
var i = 0
|
|
|
|
pr("test")
|
|
|
|
while i < 5:
|
|
pr("hello, world")
|
|
|
|
i = i + 1
|
|
end
|
|
|
|
if i > 6:
|
|
pr("`i` greater than `6`")
|
|
elif i == 4:
|
|
pr("`i` is equal to `4`")
|
|
else:
|
|
pr("i'unno")
|
|
end
|
|
|
|
let pr2 = printer("this is a final closure")
|
|
|
|
pr2("goodbye")
|
|
|
|
return {
|
|
.title = "Game",
|
|
.width = 1280,
|
|
.height = 800,
|
|
.tick_rate = 60,
|
|
}
|