(assoc-set m s v)(assoc-set m s v & more)associates a set as keys to a map (assoc-set {} #{:a :b :c} 1) => {:a 1, :b 1, :c 1}
associates a set as keys to a map
(assoc-set {} #{:a :b :c} 1)
=> {:a 1, :b 1, :c 1}(coerce v t)(coerce v t chart)associates a set as keys to a map (coerce 1 :string) => "1"
(coerce "2017-05-25T17:29:46.000Z" :instant) => (java.util.Date. 117 4 25 17 29 46)
(coerce "2017-05-25T17:29:46Z" :instant) => (java.util.Date. 117 4 25 17 29 46)
(coerce "oeuoe" :keyword) => :oeuoe
associates a set as keys to a map (coerce 1 :string) => "1" (coerce "2017-05-25T17:29:46.000Z" :instant) => (java.util.Date. 117 4 25 17 29 46) (coerce "2017-05-25T17:29:46Z" :instant) => (java.util.Date. 117 4 25 17 29 46) (coerce "oeuoe" :keyword) => :oeuoe
(hash-mapset s v)(hash-mapset s v & more)constructs a hashmap from a set of keys
(hash-mapset #{:a :b :c} 1 #{:d :e} 2) => {:c 1, :b 1, :a 1, :e 2, :d 2}
constructs a hashmap from a set of keys
(hash-mapset #{:a :b :c} 1 #{:d :e} 2)
=> {:c 1, :b 1, :a 1, :e 2, :d 2}(parse-date s)converts string to date
(parse-date "2017-05-25T17:29:46.000Z") ;;#inst "2017-05-25T09:29:46.000-00:00" => java.util.Date
converts string to date (parse-date "2017-05-25T17:29:46.000Z") ;;#inst "2017-05-25T09:29:46.000-00:00" => java.util.Date
(read-enum s)helper function for enums
(read-enum ":enum") => :enum
(read-enum "12334") => 12334
(read-enum "{}") => throws
helper function for enums
(read-enum ":enum") => :enum
(read-enum "12334") => 12334
(read-enum "{}") => throws(read-ref s)helper function for refs
(read-ref "{:a 1}") => {:a 1}
(read-ref "_") => throws
helper function for refs
(read-ref "{:a 1}") => {:a 1}
(read-ref "_") => throwscljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |