Skip to content

Instantly share code, notes, and snippets.

@pechorin
Created May 15, 2012 09:48
Show Gist options
  • Save pechorin/2700458 to your computer and use it in GitHub Desktop.
Save pechorin/2700458 to your computer and use it in GitHub Desktop.
io call target/sender
kiriy := Object clone
kiriy name := "Kiriy"
kiriy kill := method(
("my name is " .. call target name) println
("and i was killed by " .. call sender name) println
)
killer := Object clone
killer name := "Dron"
killer do_kill := method(target,
target kill
)
killer do_kill(kiriy) # => my name is kiriy
# => and i was killed by Dron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment