In Io, all code is data. Below is an example of changing a functions behaviour (from addition to subtraction):
Io> plus := block (a, b, a + b)
==> method(a, b,
a + b
)
Io> plus call (1, 2)
==> 3
Io> plus message next setName ("-")
==> -(b)
Io> plus
==> method(a, b,
a - b
)
Io> plus call (1, 2)
==> -1
ref: Io Has A Very Clean Mirror (WayBackMachine copy) - http://web.archive.org/web/20080212010904/http://hackety.org...