RosettaCodeData/Task/Closures-Value-capture/PowerShell/closures-value-capture-2.ps1
2026-04-30 12:34:36 -04:00

9 lines
158 B
PowerShell

for ($i = 1; $i -lt 11; $i++)
{
$total = Get-Closure -Number $i
[PSCustomObject]@{
Function = $i
Sum = & $total -Sum $i
}
}