by hcarvalhoalves · 10y ago · 0 comments
- Toolz (http://toolz.readthedocs.io/en/latest/) provides the same primitives from Clojure (including partial functions, compose, juxt, etc)
- Pysistence (https://pypi.python.org/pypi/pysistence/) provides immutable data structs
- For parallel map you can use https://pypi.python.org/pypi/python-pmap/1.0.2
- TCO is achievable w/ a decorator regardless of AST manipulation (like Clojure's `loop/recur` construct)
The only thing left is pattern matching and more powerful destructuring (Python already has limited support for it), I guess.
As I understand it, the primary limitation is that Python lambda only works with a single expression (I think it also has some weirdness regarding scope when calling functions?). I haven't poked seriously at Python since around about the time they were talking about removing it, so I probably have no idea what I'm talking about.
The idea is that generators and list comprehensions do the things most people do with lambdas in a more Pythonic way.
Coconut does both of those!
Is it mimics the Erlang behaviour?