Welcome to the CHICKEN Scheme pasting service

records-and-modules.scm pasted by DerGuteMoritz on Thu Sep 8 19:38:22 2016

(module foo

(make-bar bar-x)

(import chicken scheme)

(define-record bar x)

)

(module qux

(make-bar bar-x)

(import chicken scheme)

(define-record bar x)

)

(import (prefix foo foo-)
        (prefix qux qux-))

(print (qux-bar-x (foo-make-bar 123)))

same thing srfi-9 style and this time with different slot names, too! added by DerGuteMoritz on Thu Sep 8 19:41:51 2016

(module foo

(make-bar bar-x)

(import chicken scheme)

(define-record-type bar
  (make-bar x)
  bar?
  (x bar-x))

)

(module qux

(make-bar bar-y)

(import chicken scheme)

(define-record-type bar
  (make-bar y)
  bar?
  (y bar-y))

)

(import (prefix foo foo-)
        (prefix qux qux-))

(print (qux-bar-y (foo-make-bar 123)))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which module provides `get-environment-variable'?
Visually impaired? Let me spell it for you (wav file) download WAV