Handbook
Glossary
in-bounds ( a b sequence -- a' b' sequence )
Windowed sequences
Prev:
in-bound ( n sequence -- n' )
Vocabulary
sequences
.
windowed
Inputs
a
an
integer
b
an
integer
sequence
a
sequence
Outputs
sequence
a
sequence
a'
an
integer
b'
an
integer
Word description
Clamps two integers from 0 to the sequence length. While not in bounds for calling
nth
, these integers are in bounds for calling
<slice>
.
Definition
USING:
kernel
;
IN:
sequences.windowed
:
in-bounds
( a b sequence -- a' b' sequence )
[
nip
in-bound
]
[
nipd
in-bound
]
[
2nip
]
3tri
;