Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
== define-record and srfi-17 Regular define-record records don't support generalized set. This macro implements support for binding to srfi-17. <enscript highlight="scheme"> (define-syntax define-gs-record (er-macro-transformer (lambda (x r c) (let ((type (cadr x)) (fields (cddr x)) (%begin (r 'begin)) (%define-record (r 'define-record)) (%define (r 'define)) (%getter-with-setter (r 'getter-with-setter))) `(,%begin (,%define-record ,type ,@fields) ,@(map (lambda (f) (let* ((getter (symbol-append (strip-syntax type) '- (strip-syntax f))) (setter (symbol-append (strip-syntax getter) '-set!))) (list %define getter (list %getter-with-setter getter setter)))) fields)))))) </enscript> now you can say <enscript highlight="scheme"> (define-gs-record test a b c) (define t (make-test 1 2 3)) (set! (test-a t) 'new-val) </enscript>
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you subtract 13 from 21?