Table of Contents

Each

C10 - initial

each (Sifts)
TypeCorrade progressive sift
Sifteach
Parametersinteger
DescriptionThe each sift will return a strided list given a supplied number.
Last ChangesNone

The each sift will return a strided list given a supplied number.

Arguments

Position Type Description Example
0 an integer return a strided list with the given stride number 2

Example

The following sift when added to a command will return each second element in the list starting and including the first zero-indexed element:

    "sift", wasListToCSV([
        "each", 2
    ]),

Effect on Returned Data

Given the input

data=a,1,b,2,c,3,d,4,e,5

the expected output is:

data=a,b,c,d,e

Notes

For example, suppose that each second element in a list would have to be selected without accounting for zero-based indexed arrays or lists, then the sift would be:

    "sift", wasListToCSV([
        "skip", 1,
        "each", 2
    ]),

similarly, for each third element in a list:

    "sift", wasListToCSV([
        "skip", 2,
        "each", 3
    ]),