Welcome to the CHICKEN Scheme pasting service
from coops.scm added by matijja on Sat Feb 2 15:19:35 2019
(define-generic (print-object obj)) (define (default-print-method obj #!optional (out (current-output-port))) (let ((class (class-of obj))) (if (eq? class #t) (display obj out) (fprintf out "#<coops instance of `~a'>" (class-name class))))) (define-method (print-object (obj #t) #!optional (out (current-output-port))) (default-print-method obj out)) (define-method (print-object (class <standard-class>) #!optional (out (current-output-port))) (fprintf out "#<coops standard-class `~a'>" (class-name class))) (define-record-printer (coops-instance obj out) (handle-exceptions ex (begin (display "#<no print-method defined for: " out) (default-print-method obj out) (display ">" out)) (print-object obj out) ) )