Hacker News new | ask | show | jobs
by lolpep8 4356 days ago
Map and filter, of course; less syntactical noise, simple function semantics, and plenty of precedent and equivalents in all other languages.
1 comments

It's not like list comprehensions lack equivalent in other languages. Let's take Haskell for example. Python lists comprehension could use a where clause from Haskell though so one could really pack everything into a one-liner :)

(as it is now, list comprehensions requiring various references to result of a function call evaluate the function each time it's used)