[erlang-questions] list comprehension abuse

Frans Schneider <>
Wed Jun 13 19:08:25 CEST 2018


Dear list,

Just stumbled over some code using the following construct:

   [do_something(X) || X /= 1, X /= 3]

Works rather nice, but is this considered good programming? I think it 
is called "list comprehension with no generator" and has to do something 
with OTP-7846.

Frans


More information about the erlang-questions mailing list