- marked as enhancement
Implement 'numerator' and 'denominator' in scheme
Issue #91
new
numerator should return the numerator of a rational number.
denominator should return the denominator of a rational number.
This should return 2.
(numerator 2/3)
Traceback (most recent call last):
File "stdin", line 1, col 2
RunTimeError: unbound variable 'numerator'
This should return 1.
(denominator 9)
Traceback (most recent call last):
File "stdin", line 1, col 2
RunTimeError: unbound variable 'denominator'
Comments (1)
-
- Log in to comment