use nth instead of get for retrieving first element of vector

This commit is contained in:
Nathan Marz 2016-06-01 12:42:41 -04:00
parent 39a3755b49
commit 2fe16769ff

View file

@ -467,7 +467,7 @@
(extend-protocol UpdateExtremes
#+clj clojure.lang.IPersistentVector #+cljs cljs.core/PersistentVector
(update-first [v afn]
(let [val (get v 0)]
(let [val (nth v 0)]
(assoc v 0 (afn val))
))
(update-last [v afn]
@ -487,7 +487,7 @@
(extend-protocol GetExtremes
#+clj clojure.lang.IPersistentVector #+cljs cljs.core/PersistentVector
(get-first [v]
(get v 0))
(nth v 0))
(get-last [v]
(peek v))
#+clj Object #+cljs default