2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
|
|
@ -1,24 +0,0 @@
|
|||
-- Compose two functions where each function is
|
||||
-- a script object with a call(x) handler.
|
||||
on compose(f, g)
|
||||
script
|
||||
on call(x)
|
||||
f's call(g's call(x))
|
||||
end call
|
||||
end script
|
||||
end compose
|
||||
|
||||
script sqrt
|
||||
on call(x)
|
||||
x ^ 0.5
|
||||
end call
|
||||
end script
|
||||
|
||||
script twice
|
||||
on call(x)
|
||||
2 * x
|
||||
end call
|
||||
end script
|
||||
|
||||
compose(sqrt, twice)'s call(32)
|
||||
-- Result: 8.0
|
||||
Loading…
Add table
Add a link
Reference in a new issue