 
 : format-column ( seq ? -- seq )
     [
-        [ 0 [ length max ] reduce ] keep
-        swap [ CHAR: \s pad-right ] curry map
+        dup [ length ] map supremum
+        '[ _ CHAR: \s pad-right ] map
     ] unless ;
 
 : map-last ( seq quot -- seq )
-    [ dup length <reversed> ] dip [ 0 = ] prepose 2map ; inline
+    [ dup length <reversed> ] dip '[ 0 = @ ] 2map ; inline
 
 : format-table ( table -- seq )
     flip [ format-column ] map-last

USING: hashtables io io.streams.plain io.streams.string
colors summary make accessors splitting math.order
kernel namespaces assocs destructors strings sequences
present ;
IN: io.styles

GENERIC: stream-format ( str style stream -- )

M: input summary
    [
        "Input: " %
        string>> "\n" split1
        [ % ] [ "..." "" ? % ] bi*
    ] "" make ;

: write-object ( str obj -- ) presented associate format ;
