;; note that printout return i32
;; inconsistent with print and println :(
(bind-func print:[void,Shape*]*
(lambda (s)
(cond ((= (tref s 0) 1)
(Circle s
(lambda (x y z)
(printout "<Circle " x "," y "," z ">")
void)
(lambda ()
void)))
((= (tref s 0) 2)
(Rectangle s
(lambda (x y w h)
(printout "<Rectangle " x "," y "," w "," h ">")
void)
(lambda () void)))
((= (tref s 0) 3)
(Blob s
(lambda ()
(printout "<Blob>")
void)
(lambda () void)))
(else
(println "BAD shape")))))