zlacker

[parent] [thread] 2 comments
1. Madnes+(OP)[view] [source] 2023-11-28 06:46:52
I don't think your day and my day are quite the same.
replies(1): >>chrisw+Kk
2. chrisw+Kk[view] [source] 2023-11-28 10:37:22
>>Madnes+(OP)
Lambda calculus is present in most "modern" programming languages, i.e. those which use lexical scope rather than global or dynamic scope; and those which call functions to return results (especially first-class functions) rather than jumping to subroutines for their effects. It's why Python functions are written with the keyword `lambda`, and it's why Amazon's function-as-a-service product is called Lambda.

For example, say you're refactoring some code and come across:

    def foo(x):
      return bar(x)
You decide to simplify this definition to:

    foo = bar
Congratulations, you've just performed η-reduction! https://en.wikipedia.org/wiki/Lambda_calculus#%CE%B7-reducti...
replies(1): >>eru+H23
◧◩
3. eru+H23[view] [source] [discussion] 2023-11-29 02:44:14
>>chrisw+Kk
As an aside: alas, η-reduction is not something that's properly supported in Python.
[go to top]