From a1e10d9cea4ab1e8239e5139a9a7437d200deb5b Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Mon, 24 Jun 2019 12:22:10 +0100 Subject: [PATCH] Minor clean-up --- src/sparse_array/core.clj | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/sparse_array/core.clj b/src/sparse_array/core.clj index 45d8aea..db7d804 100644 --- a/src/sparse_array/core.clj +++ b/src/sparse_array/core.clj @@ -1,6 +1,5 @@ (ns sparse-array.core) - (defn make-sparse-array "Make a sparse array with these `dimensions`. Every member of `dimensions` must be a keyword; otherwise, `nil` will be returned." @@ -96,7 +95,7 @@ (vector? x) (if (every? vector? x) - (inc (apply min (map dense-dimensions x))) + (inc (apply max (map dense-dimensions x))) 1) 0)) @@ -160,17 +159,3 @@ (apply vector (repeat arity nil))))) -(sparse-to-dense (put (make-sparse-array :x) "hello" 4)) - -(def x - (put - (put - (make-sparse-array :x :y) - "hello" 3 4) - "goodbye" 4 3)) - -(child-arity x) - -(sparse-to-dense (x 1) 4) -(sparse-to-dense x) -