• (assoc-param map key val)
Associate a key with a value. If the key already exists in the map,
create a vector of values.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source ring/middleware/params.clj:6 top

(defn assoc-param
  "Associate a key with a value. If the key already exists in the map,
  create a vector of values."
  [map key val]
  (assoc map key
    (if-let [cur (map key)]
      (if (vector? cur)
        (conj cur val)
        [cur val])
      val)))
Vars in ring.middleware.params/assoc-param: assoc conj defn if-let key map val vector?
Used in 0 other vars

Comments top

No comments for assoc-param. Log in to add a comment.