Next: , Previous: Clauses, Up: Top


3 Other Features

3.1 Multiple Accumulations

It is permitted to have more than one clause accumulate into the same variable, as in the following:

  (iter (for i from 1 to 10)
        (collect i into nums)
        (collect (sqrt i) into nums)
        (finally (return nums)))

Clauses can only accumulate into the same variable if they are compatible. collect, adjoining, appending, nconcing, unioning and nunioning are compatible with each other; sum, multiply and counting are compatible; always and never are compatible; finding... such-that is compatible with either thereis or always and never when their defaults match; and maximize and minimize clauses are compatible only with other maximize and minimize clauses, respectively.