Greatest subsequential sum: Difference between revisions
m
→{{header|AppleScript}}
Line 95:
script go
on |λ|(ab, x)
set a to
set {m1, m2} to {
set high to max(Tuple(0, {}), Tuple(m1 + x, m2 & {x}))
Tuple(high, max(
end |λ|
end script
|