And something more powerful: https://github.com/jeapostrophe/exp/blob/master/sstruct-tests.ss
Jay On 3/5/12, Tom McNulty <[email protected]> wrote: > There's an example macro to do this here, although it'll only work for > structures you define. > > http://www.mail-archive.com/[email protected]/msg03392.html (See > Matthias' response) > > I recall this example quite well, as it was very helpful when I was learning > Racket macros. > > > On 2012-03-05, at 8:16 AM, Dmitry Pavlov wrote: > >> Hello, >> >> I was wondering if Racket's struct instances can be initialized >> with keywords, like in the following example written in CL: >> >> >> * (defstruct foo bar baz) >> FOO >> >> * (make-foo :bar 1 :baz 2) >> #S(FOO :BAR 1 :BAZ 2) >> >> >> Best regards, >> >> Dmitry >> ____________________ >> Racket Users list: >> http://lists.racket-lang.org/users > > -- Jay McCarthy <[email protected]> Assistant Professor / Brigham Young University http://faculty.cs.byu.edu/~jay "The glory of God is Intelligence" - D&C 93 ____________________ Racket Users list: http://lists.racket-lang.org/users

