In #129 we added suchthat for constrained relations, for example
from (i, j) suchthat i >= 0 andalso i < j andalso j < 4;
Reading Relational Expressions for Data Transformation and Computation (Pratten, Mathieson, 2023), I realized that if we just allow variables to be declared in from without an in clause - and therefore range over their entire data type - then that is sufficient. The suchthat keyword becomes unnecessary; any suchthat clause can become a where clause. The above example becomes
from i, j where i >= 0 andalso i < j andalso j < 4;
If you prefer, you can also alternate scans (introducing new variables) with filters:
In #129 we added
suchthat
for constrained relations, for exampleReading Relational Expressions for Data Transformation and Computation (Pratten, Mathieson, 2023), I realized that if we just allow variables to be declared in
from
without anin
clause - and therefore range over their entire data type - then that is sufficient. Thesuchthat
keyword becomes unnecessary; anysuchthat
clause can become awhere
clause. The above example becomesIf you prefer, you can also alternate scans (introducing new variables) with filters: