1. Rörd Hinrichsen
  2. series-comprehension

Overview

List comprehensions with the series package.
WARNING: Only COMPREHENSION called with just one binding is lazy.

Usage:

SERIES-COMPREHENSION> (comprehend (cons x y)
				  ((x (scan '(0 1 2)))
				   (y (scan '(0 1 2))))
				  (= (+ x y) 2))
((0 . 2) (1 . 1) (2 . 0))
SERIES-COMPREHENSION> (comprehension (cons x y)
				     ((x (scan '(0 1 2)))
				      (y (scan '(0 1 2))))
				     (= (+ x y) 2))
#Z((0 . 2) (1 . 1) (2 . 0))

Have fun!