[#456] | project: compiler | priority: low | category: feature | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Gilles | Gilles | open | 2005-09-22 15:50:09.0 | |
subject | “orderBy” and “removeDuplicates” clauses in “for” comprehensions. | |||
code |
for (val x <- xs; val y = 5; x > y; orderBy(pred); removeDuplicates) yield { x } |
|||
what happened | Create a list of “x” from “xs”, where x > 5 in an order defined by ”pred” and with all “x” unique. |
|||
what expected | Adding value definition, “orderBy” and “ removeDuplicates” clauses to “for” comprehensions would make them even more powerfull. It would also simplify writing database queries. | |||
[back to overview] |
Gilles edited on 2005-10-14 15:29:24.0 |
Added value définition (based on XQuery's let statement), and idea of Fatemeh. |