Hi,

It is an important restriction on Python. So Javasctip has several way
of doing lambda, correct?

Thanks

Hilaire

Le 15/05/2019 à 16:19, Richard O'Keefe a écrit :
> One point worth making is that Python lambdas are artificially restricted:
> the body of a Python lambda may only be a single expression, not a
> sequence
> of statements.  This restriction is for ideological reasons (the BDFL does
> not *want* you to do that) not for technical reasons.  Lisp and Algol 68
> were doing lambda expressions in the 60s.
>
> As well as function (x, y) { ... },
> modern Javascript has (x, y) => ....
> with subtly different semantics.
>
-- 
Dr. Geo
http://drgeo.eu



Reply via email to