eliminate compiler performance warning regarding case

This commit is contained in:
Nathan Marz 2016-06-09 17:32:40 -04:00
parent 14c404c552
commit 0c4c4369a2

View file

@ -544,7 +544,8 @@
(assoc v 0 (afn val))
))
(update-last [v afn]
(let [c (vec-count v)]
;; type-hinting vec-count to ^int caused weird errors with case
(let [c (int (vec-count v))]
(case c
1 (let [[e] v] [(afn e)])
2 (let [[e1 e2] v] [e1 (afn e2)])