mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-11 14:18:42 +01:00
Add List.map method and test
This commit is contained in:
5
test/list/map.wren
Normal file
5
test/list/map.wren
Normal file
@ -0,0 +1,5 @@
|
||||
var a = [1,2,3]
|
||||
var inc = fn (x) { return x + 1 }
|
||||
var b = a.map(inc)
|
||||
|
||||
IO.write(b) // expect: [2, 3, 4]
|
||||
Reference in New Issue
Block a user