C10 - initial
distinct (Sifts) | |
---|---|
Type | Corrade progressive sift |
Sift | distinct |
Parameters | the empty string |
Description | The distinct sift will return only unique elements in a list. |
Last Changes | None |
The distinct
sift will return only unique elements in a list.
Position | Type | Description | Example |
---|---|---|---|
0 | empty string | None | "" |
The following sift when added to a command will skip the first 2
elements, then return the distinct remaining elements and then finally count the number of remaining elements that match the regular expression [0-9]
:
"sift", wasListToCSV([ "skip", 2, "distinct", "", "count", "[0-9]" ]),
Given the input
data=a,1,c,2,c,3,h,2,h,5,j,5
the following transformations will take place:
data=c,2,c,3,h,2,h,5,j,5
,data=c,2,3,h,5,j
,data=6
and expected output is:
data=6
distinct
sift.