ClojureDocs

Nav

Namespaces

numerator

clojure.core

Available since 1.2 (source)
  • (numerator r)
Returns the numerator part of a Ratio.
1 Example
;; note that the function always returns the numerator of the reduced fraction

(numerator (/ 2 3))
;;=> 2

user=> (map numerator [(/ 2 4) (/ 4 6) (/ 6 8)])
(1 2 3)
See Also

Returns the denominator part of a Ratio.

Added by shockbob
0 Notes
No notes for numerator