mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-11 22:28:45 +01:00
This lets us share functionality between List and Range (and other user-defined sequence types).
4 lines
79 B
Plaintext
4 lines
79 B
Plaintext
var a = [1, 2, 3]
|
|
var b = a.map(fn (x) x + 1)
|
|
IO.print(b) // expect: [2, 3, 4]
|