Minor clean-up
This commit is contained in:
parent
b91dfbb90f
commit
a1e10d9cea
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue