1.2.0 permalink Arrow_down_16x16

maybe-atomize

clojure.contrib.jmx

  • (maybe-atomize k)
Convert a list of length 1 into its contents, leaving other things alone.
Used to simplify keys in the tabular data API.

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 clojure/contrib/jmx/data.clj:44 top

(defn maybe-atomize
  "Convert a list of length 1 into its contents, leaving other things alone.
  Used to simplify keys in the tabular data API."
  [k]
  (if (and (instance? java.util.List k)
           (= 1 (count k)))
    (first k)
    k))
Vars in clojure.contrib.jmx/maybe-atomize: = and count defn first instance?
Used in 0 other vars

Comments top

No comments for maybe-atomize. Log in to add a comment.