tisp

tiny lisp
git clone git://edryd.org/tisp
Log | Files | Refs | LICENSE

commit f9e4b30c16c389ac14a23c4304eb134fe31b6e2b
parent 7d3c9c42c1e6a7f1cbf20ebbb55ed4a09874f3c9
Author: Ed van Bruggen <edvb@uw.edu>
Date:   Sat,  9 Jan 2021 15:07:43 -0800

Remove numerator and denominator functions

Should just use get instead

Diffstat:
test.c | 10----------
tib/math.tsp | 2--
2 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/test.c b/test.c @@ -405,16 +405,6 @@ char *tests[][2] = { { "(Int 3/-2)", "-1" }, { "(Int 1)", "1" }, { "(Int 3.14)", "3" }, - { "(numerator 3/2)", "3" }, - { "(numerator 1/2)", "1" }, - { "(numerator -4/2)", "-2" }, - { "(numerator 24)", "24" }, - { "(denominator 1/4)", "4" }, - { "(denominator 4/3)", "3" }, - { "(denominator 4/2)", "1" }, - { "(denominator 14/8)", "4" }, - { "(denominator -4)", "1" }, - { "round", NULL }, { "(round 7/3)", "2" }, diff --git a/tib/math.tsp b/tib/math.tsp @@ -6,8 +6,6 @@ ;;; Functions -(def (numerator x) (get x 'numerator)) -(def (denominator x) (get x 'denominator)) (def (inc x) (+ x 1)) (def (dec x) (- x 1)) (def (truncate x) (* (floor (abs x)) (sgn x)))