Function composition: Difference between revisions

Content added Content deleted
Line 226: Line 226:
script
script
on |λ|(x)
on |λ|(x)
script
script go
on |λ|(a, f)
on |λ|(a, f)
mReturn(f)'s |λ|(a)
mReturn(f)'s |λ|(a)
Line 232: Line 232:
end script
end script
foldr(result, x, fs)
foldr(go, x, fs)
end |λ|
end |λ|
end script
end script
Line 252: Line 252:


on run
on run
tell compose([half, succ, root])
compose([half, succ, root])'s |λ|(5)
|λ|(5)
end tell
--> 1.61803398875
--> 1.61803398875
end run
end run