[plt-scheme] suggestions on generators.ss

From: Danny Yoo (dyoo at hkn.eecs.berkeley.edu)
Date: Fri Apr 7 04:10:17 EDT 2006

> >      ;; hygienic version
> >      (define-generator* (evens n) my-name-for-yield
> >        etc etc
> >        (my-name-for-yield n)
> >        etc etc)
> >
> > You can implement the definition of define-generator in terms of
> > define-generator* to avoid duplication.

Hi Dave,

Ok, done; thank you for the suggestion.  I also revised the macro a little
to allow for that extended currying define form, so:

    (define-generator* ((flip-flop x) y) toss
      (let loop ()
        (toss x)
        (toss y)

also works.  I'm happy that I'm getting practice with syntax-case and
begin-for-syntax, even if it is a toy.  *grin*

Posted on the users mailing list.