Apply a callback to an array: Difference between revisions
PascalABC.NET
Langurmonkey (talk | contribs) |
(PascalABC.NET) |
||
Line 2,565:
=={{header|Pascal}}==
See [[Apply_a_callback_to_an_array#Delphi | Delphi]]
=={{header|PascalABC.NET}}==
<syntaxhighlight lang="pascal">
begin
var a := Arr(1..10);
a := a.Select(x -> x * x).ToArray;
a.ForEach(x -> Print(x));
end.
</syntaxhighlight>
{{out}}
<pre>
1 4 9 16 25 36 49 64 81 100
</pre>
=={{header|Perl}}==
|