Welcome to the CHICKEN Scheme pasting service

Maintaining registration lists added by sjamaan on Mon Jul 1 14:02:45 2019

(begin-for-syntax
 (define registered-types-at-expansion-time '(test)))

(define registered-types-at-runtime '())

(define-syntax register-type
  (ir-macro-transformer
   (lambda (e i c)
     (set! registered-types-at-expansion-time
           (cons (strip-syntax (cadr e)) registered-types-at-expansion-time))
     `(begin
        (set! registered-types-at-runtime
              (cons ',(strip-syntax (cadr e)) registered-types-at-runtime))))))

(register-type my-type)

;; Then, in the REPL:
(begin-for-syntax (print registered-types-at-expansion-time)) => (my-type test)

(print registered-types-at-runtime) => (my-type)

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What's the procedure to access a character in a string by index in R5RS?
Visually impaired? Let me spell it for you (wav file) download WAV