Feather SequenceObj


sequence <sub command> ?<arg> ...?

A sequence is a container which contains a sequence of objects. There are currently two types of sequences, a series and a repeat.

A series is an arithmetic progression.

A repeat is a repetition of one object the specified number of times.

sequence repeat <count> <value>
Create a sequence of count values. e.g.
        % set a [sequence repeat 10 {}]
        {} {} {} {} {} {} {} {} {} {}
sequence series <start> <count> ?<increment>?
Create an arithmetic progression of count numbers. The nth member (0 <= n < count) is start + n * increment. If the increment is not specified then it is assumed to be 1. e.g.
        % set a [sequence series 1 10 4]
        1 5 9 13 17 21 25 29 33 37

Both of these sequences have a very compact internal representation which is not expanded when used with the generic container commands.