Skip to content

Sequence Reference

A Sequence is an infinite stream of numbers. It inherits from Iterator.

Creates a Sequence of numbers.

var seq = Sequence();

start: Number? optional - The number to start the sequence with. Defaults to 0.

step: Number? optional - The number to increment by. Defaults to 1.

All methods are inherited from the Iterator class. See the Iterator reference for documentation.

var seq = Sequence().for_each(print_ln);
// 0
// 1
// 2
// 3
// 4
// etc.