RosettaCodeData/Task/Closures-Value-capture/PowerShell/closures-value-capture-2.psh

10 lines
158 B
Text
Raw Permalink Normal View History

2016-12-05 22:15:40 +01:00
for ($i = 1; $i -lt 11; $i++)
{
$total = Get-Closure -Number $i
[PSCustomObject]@{
Function = $i
Sum = & $total -Sum $i
}
}