use nth instead of get for retrieving first element of vector
This commit is contained in:
parent
39a3755b49
commit
2fe16769ff
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue