#342
We found a match (or some matches)
 

Difficulty:Easy
Topics:List and vector


Mission: Create a function that takes 2 arguments, first argument is a predicate function, second argument is the collection. Returns the index of position in 2nd arg the elements that satisfy the predicate function in 1st arg.
test not run
(= (__ #(> % 2) [1 2 3 4 5]) [2 3 4])
test not run
(= (__ #(instance? String %) [true "Clojure" false "Scala" 42]) [1 3])
test not run
(= (__ odd? [1 2 3 4 5]) [0 2 4])
test not run
(= (__ #(clojure.string/includes? % "ad") ["adbas" "sad" "fadjar" "jumawa" "bastard" "bastad"]) [0 1 2 5])


Code which fills in the blank: