5 lines
98 B
PowerShell
5 lines
98 B
PowerShell
|
|
function map ([array] $a, [scriptblock] $s) {
|
||
|
|
$a | ForEach-Object $s
|
||
|
|
}
|
||
|
|
map (1..5) { $_ * $_ }
|