Apply a callback to an array: Difference between revisions

Updated D code
(CoffeeScript)
(Updated D code)
Line 399:
=={{header|D}}==
<lang d>import std.stdio, std.algorithm;
 
void main() {
auto array = [1, 2, 3, 4, 5];
auto m = map!q{a(x => x + 5})(array);
writeln(m);
}</lang>
Anonymous user