I didn't have much luck on clojure.org or with find-doc, but
(show 1/2)
taught me that there are numerator and denominator methods on Ratio's
underlying Java implementation, so I can now do:
(.numerator 1/2) ; => 1
(.denominator 1/2) ; => 2
Is there a more direct way? (Not that this is bad! But you can't
use .numerator as a first-order function (though #(.numerator %) is
still pretty damn good).)
In general, do you have any hints on how to go about looking for
useful Clojure functions which work with certain Clojure types ?
Thank you.
I'd welcome a patch that exposed these methods as functions in core.
Rich