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

denominator

clojure.core

  • (denominator r)
Returns the denominator part of a Ratio.

1 Example top

  • ;; denominator always returns the denominator of the reduced fraction
    ;;
    user=> (denominator (/ 2 3))
    3
    user=> (denominator (/ 3 6))
    2
    user=> (map denominator [(/ 3 2) (/ 2 3) (/ 4 5) (/ 4 6)])
    (2 3 5 3)
    user=>
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:2755 top

(defn denominator
  "Returns the denominator part of a Ratio."
  {:tag BigInteger
   :added "1.2"}
  [r]
  (.denominator ^clojure.lang.Ratio r))
Vars in clojure.core/denominator: defn
Used in 0 other vars

Comments top

No comments for denominator. Log in to add a comment.