[plt-scheme] Keyword args

From: Eli Barzilay (eli at barzilay.org)
Date: Thu Oct 21 13:32:50 EDT 2004

On Oct 21, Noel Welsh wrote:
> I want keyword args for SchemeUnit 2.0 but I don't see the
> point of reinventing an implementation when both the object
> system and Swindle use 'em.  Following this theme of
> laziness, does either implementation provide an reusable
> library that doesn't require me to use their respective
> object systems?

Swindle's "base.ss" will give you that (and almost only that):

  > (require (lib "base.ss" "swindle"))
  > ((lambda (&keys x y) (list x y)) :y 1 :x 2)
  (2 1)

You need to use it as a language module though, since it redefines
#%top to make self-quoting :keywords, as well as redefining `lambda'

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

Posted on the users mailing list.