[erlang-questions] how to quelch lc warnings?
ok
ok@REDACTED
Mon Apr 16 04:09:54 CEST 2007
Isn't this stuff about list comprehensions with no generator distracting
us from the original application of the idea? It was something like
[X || X /= []] ++ [Y || Y /= []] ++ [Z || Z /= []]
which can be written easily as a list comprehension WITH a generator:
[T | T <- [X,Y,Z], T /= []]
This way does require the invention of a name (T), but to me it is
more intention-revealing (I want those of X, Y, Z that are not empty
lists collected as a list) and avoids the repeated /= [] test.
More information about the erlang-questions
mailing list