I have a sequence s and a list of indexes into this sequence indexes. How do I retain only the items given via the indexes?
s
indexes
Simple example:
The easiest solution is to use map:
map
(defn filter-by-index [coll idx] (map (partial nth coll) idx))