check-slice ( from to seq -- from to seq )


Vocabulary
sequences

Inputs
froma non-negative integer
toa non-negative integer
seqa sequence


Outputs
froma non-negative integer
toa non-negative integer
seqa sequence


Word description
Ensures that from is less than or equal to to, and that both indices are within bounds for seq.

Errors
Throws a slice-error if the preconditions are not met.

Definition