1.3.0 permalink Arrow_down_16x16

ratio?

clojure.core

  • (ratio? n)
Returns true if n is a Ratio

1 Example top

  • user=> (ratio? 22/7)
    true
    user=> (ratio? 22)
    false
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:3169 top

(defn ratio?
  "Returns true if n is a Ratio"
  {:added "1.0"
   :static true}
  [n] (instance? clojure.lang.Ratio n))
Vars in clojure.core/ratio?:
Used in 0 other vars

Comments top

No comments for ratio?. Log in to add a comment.