Alignment bug in fmt decimal-align added by Saeren on Thu Dec 15 05:08:02 2011

;;; Synopsis: When a decimal value begins with "0.0" or "-0.0", the fmt's decimal-align
;;; procedure does not properly align the value. 

;;; Replication code:

(use fmt)

;; Nested lists representing matrix rows (used with srfi-63 homogeneous arrays)
(define X '((0.01 2.00 3.00 4.00)
            (5.00 6.00 5.00 4.00)
            (3.00 2.02 1.00 6.00)))

(define Y '((1.01 2.00 3.00 4.00)
            (5.00 6.00 5.00 4.00)
            (3.00 2.02 1.00 6.00)))

(define Z '((1.01 2.00 3.00 4.00)
            (5.00 0.09 5.00 4.00)
            (3.00 2.02 1.00 6.00)))

;; This code is similar to the example provided in the documentation.
(define (format-matrix-row row)
  (fmt-join num row " "))

(define (print-matrix mat)
  (fmt #t nl (decimal-align
              4
              (fix 3 (fmt-join/suffix
                      format-matrix-row
                      mat nl)))))