4 ms·
Swift has this as well, and it's really nice. Doing map(lambda x: x + 1, stuff) or [x + 1 for x in stuff] adds nothing of value for those very simple cases. I
by BiteCode_dev 4y ago
Swift has this as well, and it's really nice.
Doing map(lambda x: x + 1, stuff) or [x + 1 for x in stuff] adds nothing of value for those very simple cases. I wish we had map($1 + 1, stuff), or ever better, stuff |> $1 + 1.
Python does a lot of things right, but for a language with a strong emphasis on the iterator design pattern, I wish it would provide more expressive primitives.
However, it comes with the FP territory, which Python is not well suited for, and it would also imply a higher cost of entry to beginners.