2bd237913ba660c229f3129e09b14b32caf2a2e2
2 (in-package :lineal.math
)
4 (defun max-width (&rest nums
)
6 :maximize
(length (princ-to-string x
))))
8 (defun output-tuple (u &optional
(strm t
))
9 (format strm
"(~{~D~#[~:;, ~]~})" u
))
11 (defun output-matrix (mat &optional
(strm t
))
14 :with widths
= (apply #'mapcar
#'max-width mat
)
21 (format strm
"~V,@A " (car width
) elem
)
22 :else
:do
(format strm
"~V,@A]~%" (car width
) elem
))))