2023-05-24 01:22:29 +02:00
|
|
|
|
2023-11-04 12:30:45 +01:00
|
|
|
let printer = lambda (pfx):
|
2023-09-03 03:19:33 +02:00
|
|
|
return lambda (msg):
|
2023-11-04 14:41:39 +01:00
|
|
|
@print(pfx)
|
2023-09-03 03:19:33 +02:00
|
|
|
@print(msg)
|
|
|
|
end
|
2023-08-26 17:00:17 +02:00
|
|
|
end
|
|
|
|
|
2023-11-04 12:30:45 +01:00
|
|
|
let pr = printer("This is a func call")
|
2023-09-03 03:19:33 +02:00
|
|
|
var i = 0
|
|
|
|
|
2023-10-29 22:48:21 +01:00
|
|
|
pr("test")
|
2023-08-26 22:30:36 +02:00
|
|
|
|
2023-08-25 00:45:29 +02:00
|
|
|
while i < 5:
|
2023-08-26 17:00:17 +02:00
|
|
|
pr("hello, world")
|
2023-08-13 03:03:43 +02:00
|
|
|
|
2023-08-23 00:49:23 +02:00
|
|
|
i = i + 1
|
|
|
|
end
|
|
|
|
|
2023-08-25 00:45:29 +02:00
|
|
|
if i > 6:
|
2023-08-26 17:00:17 +02:00
|
|
|
pr("`i` greater than `6`")
|
2023-08-25 00:45:29 +02:00
|
|
|
elif i == 4:
|
2023-08-26 17:00:17 +02:00
|
|
|
pr("`i` is equal to `4`")
|
2023-08-25 00:45:29 +02:00
|
|
|
else:
|
2023-08-26 17:00:17 +02:00
|
|
|
pr("i'unno")
|
2023-08-25 00:45:29 +02:00
|
|
|
end
|
|
|
|
|
2023-11-04 12:30:45 +01:00
|
|
|
let pr2 = printer("this is a final closure")
|
|
|
|
|
|
|
|
pr2("goodbye")
|
|
|
|
|
2023-08-23 00:49:23 +02:00
|
|
|
return {
|
|
|
|
.title = "Game",
|
2023-07-23 04:12:45 +02:00
|
|
|
.width = 1280,
|
|
|
|
.height = 800,
|
|
|
|
.tick_rate = 60,
|
2023-05-24 01:22:29 +02:00
|
|
|
}
|