Welcome to the CHICKEN Scheme pasting service

match-let scope of record-name added by pluizer on Sun Mar 22 11:45:12 2020

(import matchable)

(define-record test-record
  a b)

(define obj (make-test-record 1 2))

(define (read-obj test-record)
  (match-let ((($ test-record a b) ;; match against a 'test-record' structure
               test-record))       ;; the variable 'test-record' gets shadowed here
                                   ;; in Chicken 5, not in 4.
    (list a b)))

(print (read-obj obj))

Your annotation:

Enter a new annotation:

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