basilisp icon indicating copy to clipboard operation
basilisp copied to clipboard

reduce-kv different from clojure

Open FalseProtagonist opened this issue 1 year ago • 1 comments

This fails in :lsp, works in :clj:

(reduce-kv (fn [acc i v] (-> acc (update :ks conj i) (update :vs conj v))) {:ks [] :vs []} [:a :b :c])

FalseProtagonist avatar Jul 30 '24 13:07 FalseProtagonist

Confirmed. Probably just need to do a map-indexed or something over the vector for now. This will require implementing a few new interfaces to support k/v reducing.

chrisrink10 avatar Jul 30 '24 14:07 chrisrink10