Using reduce to dig into Clojure sequences less than 1 minute read Notes 1 2 3 4 5 6 7 8 ;; digging_deep_into_sequence.clj (def data [1 2 [5 {:a "a" :b {:c 42 :d [1 4]}}] 7]) (defn dig [sequence & indexes] (reduce #(get %1 %2) sequence indexes)) (dig data 2 1 :b :c) Writing a dig function in Clojure Clojure get-in Twitter Facebook LinkedIn Previous Next