(find-idxs data tgt)
Inputs: [data :- [s/Any] tgt :- s/Any]
Given an N-dim data structure (nested vectors/lists) & a target value, returns a list of maps detailing where index values where the target value is found.
(is= (find-idxs [[ 1 2 3] [10 11 ] [ 9 2 8]] 2) [{:idxs [0 1], :val 2} {:idxs [2 1], :val 2}])
Inputs: [data :- [s/Any] tgt :- s/Any] Given an N-dim data structure (nested vectors/lists) & a target value, returns a list of maps detailing where index values where the target value is found. (is= (find-idxs [[ 1 2 3] [10 11 ] [ 9 2 8]] 2) [{:idxs [0 1], :val 2} {:idxs [2 1], :val 2}])
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close