Tuesday, August 01, 2017

Revisiting Lambda Calc




My video talks about "lambda calculus" in contrast to "delta calculus", the latter being more well-known as Calculus with a capital C, i.e. the calculus of Newton, Leibniz et al.

The Python language has what we call "little lambda" meaning one expression, for example:

>>> result = map(lambda x: x * x, range(30))
>>> result

>>> list(result)
[0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841]



Treating functions as "top level citizens" is more what lambda calc is all about.

Pass functions to other functions to return functions.

Do this in math class (or call it CS if you insist).