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