Apply a callback to an array: Difference between revisions

→‎{{header|Wren}}: Added output plus syntax highlighting.
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
(→‎{{header|Wren}}: Added output plus syntax highlighting.)
Line 3,449:
 
=={{header|Wren}}==
<lang wrenecmascript>var arr = [1, 2, 3, 4, 5]
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
</langpre>
 
=={{header|Yabasic}}==
9,476

edits