3 ms·
This language has some interesting properties. Here's a code example featuring a user-defined event that triggers a handler. This kind of callback-oriented indi
by tlack 6y ago
This language has some interesting properties. Here's a code example featuring a user-defined event that triggers a handler. This kind of callback-oriented indirect application at the language level would be nice for async programs.
from @std/app import start, print, exit
event loop: int64
on loop fn looper(val: int64) {
print(val)
if val >= 10 {
emit exit 0
} else {
emit loop val + 1
}
}
on start {
emit loop 0
}