LAMBDA IS IT USELESS?
Ville Vainio
vvainio at karhu.tp.spt.fi
Thu Jul 12 01:52:17 EDT 2001
"EricIDLE" <grayson-wilson at home.com> writes:
> def mult(x,y):
> return x * y
> f = reduce(mult,n)
> print f
>
> Isnt that easier??
>
> Or do I not get lambda?
Functional programming people like lambda. It looks like a "real"
function in a mathematical sense, you don't type "return", but just
map params to a value. Having side effects in lambda expressions kinda
waters this thing down, though...
You might want to look at
http://www-106.ibm.com/developerworks/library/l-prog.html
And corresponding l-prog2.html and l-prog3.html
--
Ville Vainio - http://www.tp.spt.fi/~vvainio - ICQ #115524762
Wild geese have no intention to cast a reflection
Water has no mind to assume their form
More information about the Python-list
mailing list