Of what use is 'lambda'???

Dan Schmidt dfan at harmonixmusic.com
Tue Sep 19 09:55:43 EDT 2000


jonadab at bright.net (Jonadab the Unsightly One) writes:

| OTOH, I seldom use lambda in elisp, either.  It just
| seems...  unnecessary.

I use it all the time, generally in two cases:

 - as an argument to mapcar (analogous to a map/lambda in Python)
 - when I'm adding a hook and don't want to bother naming it.

I think that the more functional of a programming style you have, the
more useful it is.

| But its existence in the language doesn't hurt anything even if you
| don't use it.  Unless you count one reserved word as significant
| namespace clogging.

It's not a reserved word.

(let ((lambda 3)) lambda)
=> 3

-- 
                 Dan Schmidt | http://www.dfan.org
Honest Bob CD now available! | http://www.dfan.org/honestbob/cd.html



More information about the Python-list mailing list