numerator -- r7rs Definition procedure;
Procedure variants:
(((n integer)) -> ((n integer)))
((rational-zero) -> (integer-zero))
rational-zero;integer-zero;((rational-not-zero) -> (integer-not-zero))
rational-not-zero;integer-not-zero;scheme:base -- (scheme base);scheme -- (scheme);(numerator q) (denominator q)These procedures return the numerator or denominator of their argument; the result is computed as if the argument was represented as a fraction in lowest terms. The denominator is always positive. The denominator of
0is defined to be1.(numerator (/ 6 4)) ===> 3 (denominator (/ 6 4)) ===> 2 (denominator (inexact (/ 6 4))) ===> 2.0
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.