7 ms·
Fwiw, you can map over Maps and Strings in clojure: (map identity "foo") ;; a seq for String is its chars ;=> (\f \o \o) (map identity {:foo
by emidln 9y ago
Fwiw, you can map over Maps and Strings in clojure:
(map identity "foo") ;; a seq for String is its chars
;=> (\f \o \o)
(map identity {:foo :bar}) ;; a seq of a Map is the
;; pairs of key/values
;=> ([:foo :bar])
- brandonbloom 9y agoAnd get works on more types, like vectors. It also returns nil instead of throwing: cljs.user=> (get [:x :y :z] 1) :y cljs.user=> (get 5 :x) nil