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