doitems ({var | (var1 var2)} {stream} {keyword value}*) {form}* [Macro]

Binds varto succesive items in stream. If var is a list of two variables, then the first variable is bound to successive items and the second variable is bound to successive states.

doitems supports the following keyword value pairs:

:periods {integer}
Sets the number of periods to perform iteration over. Defaults to 1.

Example:

? (doitems (x (items foo bar baz in random for 6))
    (format t " ~A" x))
BAR FOO BAZ BAZ FOO BAZ
NIL

See Also:

item, Item Streams, read-items


Last Modified: 5-Mar-1998