[plt-scheme] define-struct and auto fields

From: Eli Barzilay (eli at barzilay.org)
Date: Mon Oct 20 02:22:59 EDT 2008

On Oct 19, Raoul Duke wrote:
> hi,
> what i think i get from the docs is that there's only one auto value
> per struct, and that value is used to init any auto fields no
> mattery how many different auto fields there might be. i don't
> understand why i can't specify an auto value for each auto
> field. like, what if one is supposed to hold a number, and another
> is supposed to hold a list?

You can always write your own constructor function that wraps the
actual constructor, using misc defaults and/or keyword arguments.

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

Posted on the users mailing list.