index-or-length ( seq n -- seq n' )


Vocabulary
sequences

Inputs
seqa sequence
nan integer


Outputs
seqa sequence
n'an integer


Word description
Returns the input sequence and its length or n, whichever is less.

Examples

USING: sequences kernel prettyprint ; "abcd" 3 index-or-length [ . ] bi@
"abcd" 3



Definition