Common Lisp the Language, 2nd Edition


next up previous contents index
Next: Scanners Up: Series Previous: Introduction

A.2. Series Functions

change_begin
Throughout this chapter the notation S is used to denote the jth element of the series S. As in a list or vector, the first element of a series has the subscript zero.

The # macro character syntax #Zlist denotes a series that contains the elements of list. This syntax is also used when series are printed.

(choose-if #'symbolp #Z(a 2 b)) => #Z(a b)

Series are self-evaluating objects and the series data type is disjoint from all other types.


[Type specifier]
series element-type

The type specifier (series element-type) denotes the set of series whose elements are all members of the type element-type.


[Function]
series arg &rest args

The function series returns an unbounded series that endlessly repeats the values of the arguments. The second example below shows the preferred method for constructing a bounded series.

(series 'b 'c) => #Z(b c b c b c ...) 
(scan (list 'a 'b 'c)) => #Z(a b c)


change_end



AI.Repository@cs.cmu.edu