* added more predicates to its library.
This commit is contained in:
parent
0eaf9be5a7
commit
b38d1f31ac
BIN
src/ikarus.boot
BIN
src/ikarus.boot
Binary file not shown.
|
@ -46,22 +46,6 @@
|
||||||
(error 'fxlognot "~s is not a fixnum" x))
|
(error 'fxlognot "~s is not a fixnum" x))
|
||||||
($fxlognot x)))
|
($fxlognot x)))
|
||||||
|
|
||||||
(primitive-set! 'immediate? (lambda (x) (immediate? x)))
|
|
||||||
|
|
||||||
(primitive-set! 'boolean? (lambda (x) (boolean? x)))
|
|
||||||
|
|
||||||
(primitive-set! 'char? (lambda (x) (char? x)))
|
|
||||||
|
|
||||||
(primitive-set! 'vector? (lambda (x) (vector? x)))
|
|
||||||
|
|
||||||
(primitive-set! 'string? (lambda (x) (string? x)))
|
|
||||||
|
|
||||||
(primitive-set! 'procedure? (lambda (x) (procedure? x)))
|
|
||||||
|
|
||||||
(primitive-set! 'null? (lambda (x) (null? x)))
|
|
||||||
|
|
||||||
(primitive-set! 'pair? (lambda (x) (pair? x)))
|
|
||||||
|
|
||||||
(let ()
|
(let ()
|
||||||
(define fill!
|
(define fill!
|
||||||
(lambda (v i n fill)
|
(lambda (v i n fill)
|
||||||
|
|
|
@ -1,16 +1,33 @@
|
||||||
|
|
||||||
(library (ikarus predicates)
|
(library (ikarus predicates)
|
||||||
|
|
||||||
(export fixnum? flonum? bignum? number? complex? real? rational?
|
(export fixnum? flonum? bignum? number? complex? real? rational?
|
||||||
integer? exact? eof-object?)
|
integer? exact? eof-object? immediate? boolean? char?
|
||||||
|
vector? string? procedure? null? pair? symbol?)
|
||||||
|
|
||||||
(import
|
(import
|
||||||
|
|
||||||
(except (ikarus) fixnum? flonum? bignum? number? complex? real?
|
(except (ikarus) fixnum? flonum? bignum? number? complex? real?
|
||||||
rational? integer? exact? eof-object?)
|
rational? integer? exact? eof-object? immediate?
|
||||||
(rename (only (ikarus) fixnum? flonum? bignum? eof-object?)
|
boolean? char? vector? string? procedure? null?
|
||||||
|
pair? symbol?)
|
||||||
|
|
||||||
|
(rename (only (ikarus) fixnum? flonum? bignum? eof-object?
|
||||||
|
immediate? boolean? char? vector? string? procedure?
|
||||||
|
null? pair? symbol?)
|
||||||
(fixnum? sys:fixnum?)
|
(fixnum? sys:fixnum?)
|
||||||
(flonum? sys:flonum?)
|
(flonum? sys:flonum?)
|
||||||
(bignum? sys:bignum?)
|
(bignum? sys:bignum?)
|
||||||
(eof-object? sys:eof-object?)
|
(eof-object? sys:eof-object?)
|
||||||
))
|
(immediate? sys:immediate?)
|
||||||
|
(boolean? sys:boolean?)
|
||||||
|
(char? sys:char?)
|
||||||
|
(vector? sys:vector?)
|
||||||
|
(string? sys:string?)
|
||||||
|
(procedure? sys:procedure?)
|
||||||
|
(null? sys:null?)
|
||||||
|
(pair? sys:pair?)
|
||||||
|
(symbol? sys:symbol?)))
|
||||||
|
|
||||||
(define fixnum?
|
(define fixnum?
|
||||||
(lambda (x) (sys:fixnum? x)))
|
(lambda (x) (sys:fixnum? x)))
|
||||||
|
@ -58,8 +75,15 @@
|
||||||
[else
|
[else
|
||||||
(error 'exact? "~s is not a number" x)])))
|
(error 'exact? "~s is not a number" x)])))
|
||||||
|
|
||||||
(define eof-object?
|
(define eof-object? (lambda (x) (sys:eof-object? x)))
|
||||||
(lambda (x)
|
(define immediate? (lambda (x) (sys:immediate? x)))
|
||||||
(sys:eof-object? x)))
|
(define boolean? (lambda (x) (sys:boolean? x)))
|
||||||
|
(define char? (lambda (x) (sys:char? x)))
|
||||||
|
(define vector? (lambda (x) (sys:vector? x)))
|
||||||
|
(define string? (lambda (x) (sys:string? x)))
|
||||||
|
(define procedure? (lambda (x) (sys:procedure? x)))
|
||||||
|
(define null? (lambda (x) (sys:null? x)))
|
||||||
|
(define pair? (lambda (x) (sys:pair? x)))
|
||||||
|
(define symbol? (lambda (x) (sys:symbol? x)))
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue