@(collect)
@  (coll)@{item /[^$]+/}@(end)
@(end)
@; nc = number of columns
@; pi = padded items (data with row lengths equalized with empty strings)
@; cw = vector of max column widths
@; ce = center padding
@(bind nc @(apply (fun max) (mapcar (fun length) item)))
@(bind pi @(mapcar (lambda (row) 
                     (append row (repeat '("") (- nc (length row)))))
                   item))
@(bind cw @(vector-list 
             (mapcar (lambda (column)
                       (apply (fun max) (mapcar (fun length) column)))
                     ;; matrix transpose trick cols become rows:
                     (apply (fun mapcar) (cons (fun list) pi)))))
@(bind ns "")
@(output)
@  (repeat)
@    (rep :counter i)@{pi @[cw i]} @(end)
@  (end)
@  (repeat)
@    (rep :counter i)@{pi @(- [cw i])} @(end)
@  (end)
@  (repeat)
@    (rep :counter i)@\
     @{ns @(trunc (- [cw i] (length pi)) 2)}@\
     @{pi @(- [cw i] (trunc (- [cw i] (length pi)) 2))} @(end)
@  (end)
@(end)