4 ms·
Multi-line lambdas: Reia can do them... why can't Python?
- gaius 18y agoThe simple answer is that Guido doesn't entirely approve of functional programming. Look at the FP features stripped out between Python 2.x and 3 for example. This IMHO is a mistake; the race is on now for OCaml to mature quickly enough to be there waiting for the current generation of Python FP people who'll be looking for an alternative when Py3K becomes mainstream.
- ash 18y ago> Look at the FP features stripped out between Python 2.x and 3 for example. I haven't heard of even one "FP feature stripped out". Am I missing something?
- gaius 18y agoHave a read of this: http://sandersn.com/blog/index.php?title=real_world_haskell&more=1&c=1&tb=1&pb=1 http://sandersn.com/blog/index.php?title=real_world_haskell&...
- 13ren 18y agoI'm not an expert in python, but this works. It looks like a multi-line lambda to me. print map( lambda word: len(word), 'no multiline lambdas, not nobody not nohow'.split() )