RosettaCodeData/Task/Accumulator-factory/AppleScript/accumulator-factory-2.applescript

19 lines
221 B
AppleScript
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
on run
set x to foo(1)
x's |λ|(5)
foo(3)
x's |λ|(2.3)
end run
-- foo :: Int -> Script
on foo(sum)
script
on |λ|(n)
set sum to sum + n
end |λ|
end script
end foo