Now and then I use the Python lambda. Is it so formal that it is safe to say that you can do formal lambda calculus with it? I just used it but I didn't fully understand whether the python lambda and the lambda calculus like I read was done by Alonzo Church. I also used it in Javascript, I think. Isn't this more common in functional languages (e.g. Haskell, Scheme/Lisp, Clojure...) and I never saw lambda in use with Java or C(++)?
Is says on this site " a function you can pass on to another function as argument.".
But how do I get used to it enough so that I can tell where to benefit from it? If I can do it in say SQL, JPQL or GQL instead, shouldn't I prefer to do it in the query language?
(lambda x, y: x + y)(1, 2)
and(lambda x, y: x + y)("A", "B")
, but(lambda x, y: x + y)(1, "A")
gives an error. In untyped lambda calculus the last expression would be valid because there is no distinction between truth numbers and strings. – Giorgio Feb 06 '13 at 14:23+
) within a lambda expression. – Giorgio Feb 06 '13 at 14:44