Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
|
|
@ -0,0 +1,25 @@
|
|||
-- This handler takes a script object (singer)
|
||||
-- with another handler (call).
|
||||
on sing about topic by singer
|
||||
call of singer for "Of " & topic & " I sing"
|
||||
end sing
|
||||
|
||||
-- Define a handler in a script object,
|
||||
-- then pass the script object.
|
||||
script cellos
|
||||
on call for what
|
||||
say what using "Cellos"
|
||||
end call
|
||||
end script
|
||||
sing about "functional programming" by cellos
|
||||
|
||||
-- Pass a different handler. This one is a closure
|
||||
-- that uses a variable (voice) from its context.
|
||||
on hire for voice
|
||||
script
|
||||
on call for what
|
||||
say what using voice
|
||||
end call
|
||||
end script
|
||||
end hire
|
||||
sing about "closures" by (hire for "Pipe Organ")
|
||||
Loading…
Add table
Add a link
Reference in a new issue