! Copyright (C) 2011-2012 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-
USING: accessors assocs calendar combinators environment fonts
formatting fry io io.streams.string kernel literals locals make
math math.order math.ranges namespaces pdf.canvas pdf.values
] each widths >alist sort-keys values
! make last cell larger
- dup sum 400 swap [-] [ + ] curry dupd change-last
+ dup sum 400 swap [-] [ + ] curry dupd sequences.extras:change-last
! size down each column
dup sum dup 400 > [ 400 swap / [ * ] curry map ] [ drop ] if ;