Take the 2-minute tour ×
#lang swindle
(require swindle/misc

(defclass* jacket ()
  (size :initvalue 40 :accessor sj)
  :printer #t)

(defclass* trousers ()
  (size :initvalue 44 :accessor st)
  :printer #t)

(defclass* suit (jacket trousers)

If i compile this code and write (make suit) | (make jacket) | make (trousers) into the interpreter, the return is always #<procedure:swindleobj> but it should be sth like #<jacket size=40>.

Did I miss any requires or what am I doing wrong?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Your code is working for me:

#lang swindle
(defclass* jacket () (size :initvalue 40 :accessor sj) :printer #t)
(define x (make jacket))

(displayln x)
=> #<jacket: size=40>

(displayln (slot-ref x 'size))
=> 40

(displayln (sj x))
=> 40
share|improve this answer
ah, that display does the trick. thank you so much, im just a beginner in using swindle :) –  user2658567 Jan 11 at 10:13

Your Answer


