diff --git a/lib/scheme/char.sld b/lib/scheme/char.sld index 554179cd..0a70429a 100644 --- a/lib/scheme/char.sld +++ b/lib/scheme/char.sld @@ -1,6 +1,6 @@ (define-library (scheme char) - (import (scheme)) + (import (scheme) (only (scheme base) string-map)) (export char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-foldcase char-lower-case? char-numeric? diff --git a/lib/scheme/inexact.scm b/lib/scheme/inexact.scm new file mode 100644 index 00000000..03fa316f --- /dev/null +++ b/lib/scheme/inexact.scm @@ -0,0 +1,6 @@ + +(define (finite? x) + (and (real? x) (not (nan? x)) (not (= x +inf.0)) (not (= x -inf.0)))) + +(define (nan? x) + (and (real? x) (not (= x x)))) diff --git a/lib/scheme/inexact.sld b/lib/scheme/inexact.sld index dea7f65d..8dba2787 100644 --- a/lib/scheme/inexact.sld +++ b/lib/scheme/inexact.sld @@ -1,4 +1,5 @@ (define-library (scheme inexact) (import (scheme)) - (export acos asin atan cos exp finite? log nan? sin sqrt tan)) + (export acos asin atan cos exp finite? log nan? sin sqrt tan) + (include "inexact.scm"))