clojurescript port complete, not working for greater than 20 params
This commit is contained in:
parent
ffaaf06f9f
commit
c6522de07d
2 changed files with 15 additions and 2 deletions
|
|
@ -97,8 +97,12 @@
|
|||
(-invoke [this p01 p02 p03 p04 p05 p06 p07 p08 p09 p10
|
||||
p11 p12 p13 p14 p15 p16 p17 p18 p19 p20
|
||||
rest]
|
||||
;;TODO: fill this in for cljs
|
||||
(println "Var arity version in cljs!")
|
||||
(let [a (object-array
|
||||
(concat
|
||||
[p01 p02 p03 p04 p05 p06 p07 p08 p09 p10
|
||||
p11 p12 p13 p14 p15 p16 p17 p18 p19 p20]
|
||||
rest))]
|
||||
(com.rpl.specter.impl/bind-params* this a 0))
|
||||
))
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -523,3 +523,12 @@
|
|||
))
|
||||
))))
|
||||
|
||||
(deftest large-params-test
|
||||
(let [path (apply s/comp-paths (repeat 25 s/keypath))
|
||||
m (reduce
|
||||
(fn [m k]
|
||||
{k m})
|
||||
:a
|
||||
(reverse (range 25)))]
|
||||
(is (= :a (s/select-one (apply path (range 25)) m)))
|
||||
))
|
||||
|
|
|
|||
Loading…
Reference in a new issue