You're viewing version 1.2.0 of ratio?. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16



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

1 Example top

  • user=> (ratio? 22/7)
    user=> (ratio? 22)
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:2743 top

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

Comments top

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