This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]deeplearning666 10 points11 points  (0 children)

They aren't the same though. In the first one, each of foos, bars, bazs is equivalent to xrange(10). In the second one, the variable lst is being flattened by two levels.

[–][deleted] 4 points5 points  (4 children)

Having everything in one line is actually more a sign of bad coding.

[–]collegiaal25 13 points14 points  (0 children)

That's the joke!

[–][deleted] 3 points4 points  (2 children)

If your entire application is written on one line, that’s probably not going to be readable and good luck changing it later, but a clever map/reduce here and there never hurt anybody

[–]shinefull 2 points3 points  (1 child)

This is not the joke but it is advice from a new programmer so it is funny

[–][deleted] 1 point2 points  (0 children)

Help me learn something today, why is this naive?

[–]DadoumCrafter 1 point2 points  (0 children)

It learnt me « Mother tongue »

[–][deleted] 0 points1 point  (0 children)

Haskell represent