ostap/comp — pull request #34 by julochrobak (2014-01-17 11:40:47+00:00)
Title: fixing incorrect evaluation of the select conditions for inner loops

The select conditions for the inner loops are badly assigned and evaluated while executing the outer loop.

The following comprehension returns null:

$ bin/comp '[{g,c}|g <- [1], c <- [0], c-1 == 0 && c == 0]' 2> /dev/null
$

While the following returns unexpectedly some data:

$ bin/comp '[{g,c}|g <- [1], c <- [0], c-1 == 0, c == 0]' 2> /dev/null
[ { "g": 1, "c": 0 } ]
$