This website requires JavaScript.
Explore
Help
Register
Sign In
retoor
/
wren
Watch
1
Star
0
Fork
0
Code
Issues
Pull Requests
Actions
Packages
Projects
Releases
Wiki
Activity
Files
b7d03971c6920a953641e9b7085e675c0a5f11ac
wren
/
test
/
list
/
map.wren
T
4 lines
78 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Cleanups for merging map method
2014-02-15 00:34:30 -06:00
var a = [1, 2, 3]
Convert all fns to block arg syntax.
2014-04-02 19:41:53 -07:00
var b = a.map {|x| x + 1 }
Cleanups for merging map method
2014-02-15 00:34:30 -06:00
IO.print(b) // expect: [2, 3, 4]
Reference in New Issue
Copy Permalink