Apply a callback to an array: Difference between revisions
→{{header|Wren}}: Added output plus syntax highlighting.
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
(→{{header|Wren}}: Added output plus syntax highlighting.) |
||
Line 3,449:
=={{header|Wren}}==
<lang
arr = arr.map { |x| x * 2 }.toList
arr = arr.map(Fn.new { |x| x / 2 }).toList
arr.each { |x| System.print(x) }</lang>
</lang>▼
{{out}}
<pre>
1
2
3
4
5
=={{header|Yabasic}}==
|