mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-13 23:28:53 +01:00
- Compile them as calls and definitions. - Use them for call(), clear(), run(), try(), and yield(). - Update the docs.
11 lines
140 B
Plaintext
11 lines
140 B
Plaintext
var list = []
|
|
|
|
for (i in [1, 2, 3]) {
|
|
list.add(new Fn { IO.print(i) })
|
|
}
|
|
|
|
for (f in list) f.call()
|
|
// expect: 1
|
|
// expect: 2
|
|
// expect: 3
|