* moved fxadd1 and fxsub1 to ikarus.fixnums

This commit is contained in:
Abdulaziz Ghuloum 2007-05-05 04:19:18 -04:00
parent 0399dc386e
commit 7e421bb907
3 changed files with 19 additions and 15 deletions

Binary file not shown.

View File

@ -12,18 +12,7 @@
(lambda () (void)))
(primitive-set! 'fxadd1
(lambda (n)
(if (fixnum? n)
($fxadd1 n)
(error 'fxadd1 "~s is not a fixnum" n))))
(primitive-set! 'fxsub1
(lambda (n)
(if (fixnum? n)
($fxsub1 n)
(error 'fxsub1 "~s is not a fixnum" n))))
(primitive-set! 'integer->char
(lambda (n)

View File

@ -3,16 +3,31 @@
(library (ikarus fixnums)
(export fxzero?)
(export fxzero? fxadd1 fxsub1)
(import
(except (ikarus) fxzero?))
(only (scheme) $fxadd1 $fxsub1)
(except (ikarus) fxzero? fxadd1 fxsub1))
(define fxzero?
(lambda (x)
(cond
[(eq? x 0) #t]
[(fixnum? x) #f]
[else (error 'fxzero? "~s is not a fixnum" x)]))))
[else (error 'fxzero? "~s is not a fixnum" x)])))
(define fxadd1
(lambda (n)
(if (fixnum? n)
($fxadd1 n)
(error 'fxadd1 "~s is not a fixnum" n))))
(define fxsub1
(lambda (n)
(if (fixnum? n)
($fxsub1 n)
(error 'fxsub1 "~s is not a fixnum" n))))
)
(library (ikarus flonums)