Global

Methods

takeShort(seq, no) → {Iterator}

Source:

Yields an iter­ator of the first no ele­ments in the given se­quence; the res­ult­ing iter­ator may con­tain less then no ele­ments if the in­put se­quence was shorter than no ele­ments.

Parameters:
Name Type Description
seq Sequence

Any se­quence for which iter() is defined

no Number

The num­ber of ele­ments to take

Returns:

The first ele­ment for which pred re­turns false plus the rest of the se­quence.

Type
Iterator