[plt-scheme] Stream comprehensions

From: Eli Barzilay (eli at barzilay.org)
Date: Mon Jul 2 20:26:29 EDT 2007

On Jul  2, Mark Engelberg wrote:
> Teaching how to write streams as macros seems reasonable, but
> comprehension macros can get pretty hairy.  What set of macro
> primitives are good to teach on a first exposure?  Just extend-syntax?
>  Maybe the defsubst included in misc.ss?

`defsubst' is a simple abbreviation for `define-syntax' and
`syntax-rules'.  It's probably better to use them -- `defsyntax' looks
close enough to a plain function to be too confusing for newbies.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

Posted on the users mailing list.