RosettaCodeData/Task/Accumulator-factory/PowerShell/accumulator-factory-1.psh

5 lines
119 B
Plaintext

function Get-Accumulator ([double]$Start)
{
{param([double]$Plus) return $script:Start += $Plus}.GetNewClosure()
}