Found a serious fault in display.clj because marginalia picked it up.

Hadn't been picked up otherwise because

(1) I hadn't written any unit tests for it, and
(2) it isn't actually used by anything.

Should possibly be deleted.
This commit is contained in:
simon 2014-08-16 21:50:18 +01:00
parent 6fd8e4bb13
commit 2bf9d34794
2 changed files with 3 additions and 2 deletions

View file

@ -35,4 +35,4 @@
[world]
(apply vector
(cons :table
(map render-world-row world)))
(map render-world-row world))))

View file

@ -30,13 +30,14 @@
true (cons (make-cell index height)
(make-world-row (inc index) width height))))
(defn- make-world-rows [index width height]
(defn- make-world-rows
"Make the (remaining) rows in a world of this width and height, from this
index.
* `index` y coordinate of the next row to be created;
* `width` total width of the matrix, in cells;
* `height` total height of the matrix, in cells."
[index width height]
(cond (= index height) nil
true (cons (apply vector (make-world-row 0 width index))
(make-world-rows (inc index) width height))))