     dup assoc-size "entries" container-summary ;
 
 M: object tuple-summary
-    class-of "a %s tuple" sprintf ;
+    class-of name>> "a " " tuple" surround ;
 
 M: unordered-set tuple-summary
     dup cardinality "members" container-summary ;

! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs classes continuations formatting kernel math
sequences sets strings ;
IN: summary

GENERIC: summary ( object -- string )

: object-summary ( object -- string ) class-of name>> ; inline

: container-summary ( obj size word -- str )
    [ object-summary ] 2dip [
        [ % " with " % ] [ # ] [ " " % % ] tri*
    ] "" make ;

GENERIC: tuple-summary ( object -- string )

