Skip
Skips the specified number of items from the given sequence and returns the remaining ones.
Syntax
Sequence.Skip
· [count]
· [sequence]
Parameters
- count
- The number of item to skip.
- sequence
- The sequence to return items from.
Return Value
A sequence containing the remaning items from the given sequence.
Remarks
This can be used in conjunction with Sequence.First to get a specific item in a sequence.
As an example, the following would get the fourth element selected by the MySelector
selector:
Sequence.First
· Sequence.Skip
· 3
· Select.MySelector
Note that skipping 3 elements gives the fourth element because skipping 0 elements would give the first one. If MySelector
selects less than 4 elements, an empty sequence will be produced. If this functionality is needed more than once in a project, it can also be generalized into a function that takes a zero based index and a sequence:
function (index selector)
Sequence.First
· Sequence.Skip
· index
· selector
Supposing the function was pasted into a global called GetElement
, it could be used anywhere within the project like this:
GetElement
· 3
· Select.MySelector