Add List.map method and test

This commit is contained in:
Kyle Marek-Spartz
2014-02-14 23:06:29 -06:00
parent b1bae8fc6c
commit 83ea5aaf45
3 changed files with 21 additions and 0 deletions

5
test/list/map.wren Normal file
View 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]