Is there a way to remove an item from a vector based on index as of now i am using subvec to split the vector and recreate it again. I am looking for the reverse of assoc fo
Here is a solution iv found to be nice:
(defn index-exclude [r ex] "Take all indices execpted ex" (filter #(not (ex %)) (range r))) (defn dissoc-idx [v & ds] (map v (index-exclude (count v) (into #{} ds)))) (dissoc-idx [1 2 3] 1 2) '(1)