[plt-scheme] How to apply a multi-argument function to each element of a list

From: Stephen Bloch (sbloch at adelphi.edu)
Date: Tue Mar 2 22:10:16 EST 2010

On Mar 2, 2010, at 10:06 PM, Matthias Felleisen wrote:

> In your case, use scheme. (One day, try lazy.)

Not until I need to :-)

> The novel concept is that a function (name) doesn't have to appear  
> to the right of ( and thus becomes a value in its own right. I  
> switched from lambda to this way of introducing 1st-class functions  
> when I realized that kids like naming things.

I teach local for variables, then point out that you can also define  
functions locally.  Eventually I introduce lambda, telling students  
"Anything you can do with local, you can do with lambda, possibly  
shorter.  Anything you can do with lambda, you can do with local,  
possibly clearer."

Stephen Bloch
sbloch at adelphi.edu

Posted on the users mailing list.