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