|
|
|
|
|
by jacquesm
4155 days ago
|
|
> You see the point I'm driving at, though? Yes, absolutely. I thought you were right on the money with the words but I figured a bit of code would do wonders to hammer it down. Erlang does an even better job I think: [X * X || X <- lists:seq(1,10), X * X > 10, X * X < 100].
Or: [Y || Y <- [X * X || X <- lists:seq(1,10)], Y > 10, Y < 100].
Slightly longer, but without that X * X repetition. |
|