Welcome to the CHICKEN Scheme pasting service
prepare datatype for C6 added by gahr 16 hours ago
Index: tests/run.scm =================================================================== --- tests/run.scm (revision 44662) +++ tests/run.scm (working copy) @@ -15,7 +15,7 @@ (test "listify" '((33 . 44) . 55) (listify t)) -(define-record-printer (tree x out) +(define (print-tree x out) (cases tree x (leaf (n) (fprintf out "~A" n)) @@ -22,6 +22,10 @@ (branch (left right) (fprintf out "(~A . ~A)" left right)))) +(cond-expand + (chicken-5 (define-record-printer (tree x out) (print-tree x out))) + (chicken-6 (set-record-printer! tree print-tree))) + (test "to string" "((33 . 44) . 55)" (->string t))