Apply a callback to an array: Difference between revisions
m
→{{header|PowerShell}}
Drkameleon (talk | contribs) No edit summary |
|||
Line 2,381:
<lang powershell>function map ([array] $a, [scriptblock] $s) {
$a | ForEach-Object $s
}
map (1..5) { $_ * $_ }</lang>
=={{header|Prolog}}==
|