Common Lisp the Language, 2nd Edition
Next: Scanners
Up: Series
Previous: Introduction
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
#Z
list
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)
AI.Repository@cs.cmu.edu