mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Added (rational?) (complex?) stubs
This commit is contained in:
parent
c79a79b221
commit
f671d85ce6
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue