From f671d85ce6b897ea61f047fd5457452702535eff Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 31 Mar 2016 21:45:28 -0400 Subject: [PATCH] Added (rational?) (complex?) stubs --- scheme/base.sld | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scheme/base.sld b/scheme/base.sld index 8461cfb4..94a86b7b 100644 --- a/scheme/base.sld +++ b/scheme/base.sld @@ -37,6 +37,8 @@ exact? inexact? odd? + complex? + rational? gcd lcm quotient @@ -175,8 +177,6 @@ ; write-u8 ; ; ; No complex or rational numbers at this time -; complex? -; rational? ; rationalize ; ; ; Need to change how integer? works, to include floatings points without any decimals @@ -974,6 +974,8 @@ return_closcall1(data, k, boolean_t); return_closcall1(data, k, boolean_f); ") (define (inexact? num) (not (exact? num))) + (define complex? number?) + (define rational? number?) (define (max first . rest) (foldl (lambda (old new) (if (> old new) old new)) first rest)) (define (min first . rest) (foldl (lambda (old new) (if (< old new) old new)) first rest)) ; Implementations of gcd and lcm using Euclid's algorithm