[plt-scheme] Programming without Objects
On Mon, Aug 25, 2008 at 3:57 PM, CuppoJava <patrickli_2001 at hotmail.com> wrote:
> ie. in an OO language:
>
> A function that takes a list of objects, and then calls quack() on
> each object in turn.
>
> Therefore, any object that implements quack() can be used with that
> function.
>
> How would you structure a similar program in Scheme without OO?
>
In Scheme:
A function takes a list of functions and then calls each of them in turn.
Therefore, any function can be used with that function.
See also:
http://people.csail.mit.edu/gregs/ll1-discuss-archive-html/msg03277.html
--
troels