[erlang-questions] QLC limitation: early evalutation of list expressions

Andras Georgy Bekes bekesa@REDACTED
Wed Aug 6 17:37:16 CEST 2008


In the QLC doc, I read:

"The evaluation of a query handle begins by ... Next all list 
expressions [query handle or a list] are evaluated."

So while you can write this in a list comprehension:
[ X || N <- ListExpression, X <- ListExpressionUsingN ].

you can't write this in QLC.

What is the real reason of this behaviour? Only performance, or 
something else?

Are there any ways to circumvent this, besides writing

qlc:append([[X || X <- ListExpressionUsingN] || N <- ListExpression ]).



More information about the erlang-questions mailing list