Eduardo Cavazos <wayo.cava...@gmail.com> wrote:

it would be nice to also write literal records:

   '#queue(a b c)

Given a queue record type. (The particular syntax is just an example)

Grant Rettke wrote:

PLT has a "prefab" structure type that works like you describe:

http://download.plt-scheme.org/doc/html/guide/define-struct.html#(part._prefab-struct)

#lang scheme

(define-struct posn (x y) #:prefab)

(posn? (make-posn 10 12)) ; => #t

(make-posn 10 12) ; => #s(posn 10 12)v

(posn? #s(posn 10 12)) ; => #t

Thanks for the pointer Grant.

It looks like the Chez Scheme reader also supports it's native records.

Ed

Reply via email to