Closed Lutzifer closed 8 years ago
I'd suggest to introduce a set
operator which takes a list parameter and returns a set, i.e. removes duplicate entries. Here are some examples:
set([1,1,2,2,3,4]) == [1,2,3,4]
set([{i: 1, c: "A"}, {i: 1, c: "A"}, {i: 1, c: "a"}]) == [{i: 1, c: "A"}, {i: 1, c: "a"}]
set([ [1,2], [1,3], [1,2], [3,1] ]) == [ [1,2], [1,3], [3,1] ]
An operator, that removes double entries from the query results:
e.g. [ {e.name} | e <~ geonames, e.altnames =~ "Passau", unique(e.name) ]