Vocabulary

sequences

Inputs and outputs

Generic word contract

Outputs the nth element of the sequence. Elements are numbered from zero, so the last element has an index one less than the length of the sequence. All sequences support this operation.

Errors

Throws a bounds-error if the index is negative, or greater than or equal to the length of the sequence.

Definition

Methods

sequences

Inputs and outputs

n | a non-negative integer |

seq | a sequence |

elt | the element at the nth index |

Generic word contract

Outputs the nth element of the sequence. Elements are numbered from zero, so the last element has an index one less than the length of the sequence. All sequences support this operation.

Errors

Throws a bounds-error if the index is negative, or greater than or equal to the length of the sequence.

Definition

Methods