3 ms·
Y Combinator in Python λ Shorthand
- mdemare 19y agoIn Ruby it's even easier: module Kernel alias ? lambda end (where ? is the lambda-sign... why does it show in the title but not in the comments? oh well...) and put this: $KCODE = 'UTF-8' at the beginning of your program. I used it for a while but eventually dropped it because a lack of editor support and the strange look of the lambda in my chosen font.
- herdrick 19y agoHe's right to want this; it's great in DrScheme. I can't stand typing out l-a-m-b-d-a anymore. Just cntrl-\ and you've got it. "Lambda expressions are rarely useful in Python." Sad but probably true. In my limited experience with Python you are steered away from lambdas.