3 ms·
I guess preferences vary but to me [x**2 for x in range(10)] is a lot easier to read at a glance than range(10).map(x -> x**2).
by ummonk 3y ago
I guess preferences vary but to me [x**2 for x in range(10)] is a lot easier to read at a glance than range(10).map(x -> x**2).
- stjohnswarts 3y agoHaskell always seemed like it was meant for the really mathematical subset of compsci that loves notation and that's why some of those who really love compsci love it.
- nequo 3y agoIncidentally, Haskell has list comprehensions so you could write [x^2 | x <- [1..10]] which looks about as legible as the Python version.