[uim-commit] r1503 - branches/r5rs/scm

tkng at freedesktop.org tkng at freedesktop.org
Thu Sep 15 20:36:10 PDT 2005


Author: tkng
Date: 2005-09-15 20:36:08 -0700 (Thu, 15 Sep 2005)
New Revision: 1503

Modified:
   branches/r5rs/scm/util.scm
Log:
* scm/util.scm: Remove wrongly committed code by auto-merge in revision 1497.
 -(else, interaction-environment, boolean?, integer?, char?, list?, zero?,
   positive?, negative?, number->string, string->number, string->symbol, 
   map, for-each, list-tail, char-upper-case?, char-lower-case?, char-alphabetic?,
   char-numeric?, char-downcase, char-upcase, bitwise-and, bitwise-ior, 
   bitwise-xor): Removed.

Modified: branches/r5rs/scm/util.scm
===================================================================
--- branches/r5rs/scm/util.scm	2005-09-15 20:11:50 UTC (rev 1502)
+++ branches/r5rs/scm/util.scm	2005-09-16 03:36:08 UTC (rev 1503)
@@ -214,82 +214,8 @@
 	  (set-cdr! (last-pair lst) obj)
 	  lst))))
 
-;; definition of 'else' has been moved into slib.c
-;(define else #t)
-
-;; for eval
-(define interaction-environment
-  (lambda ()
-    ()))
-
-(define boolean?
-  (lambda (x)
-    (or (eq? x #t)
-        (eq? x #f))))
-
-(define integer?
-  (lambda (x)
-    (number? x)))
-
-;; Siod doesn't support char
-(define char?
-  (lambda (x)
-    #f))
-
-(define list?
-  (lambda (x)
-    (or (null? x)
-	(and (pair? x)
-	     (list? (cdr x))))))
-
-(define zero?
-  (lambda (x)
-    (if (integer? x)
-	(= x 0)
-	(error "non-numeric value for zero?"))))
-
-(define positive?
-  (lambda (x)
-    (> x 0)))
-
-(define negative?
-  (lambda (x)
-    (< x 0)))
-
-(define number->string integer->string)
-(define string->number string->integer)
-(define string->symbol intern)
-
-(define map
-  (lambda args
-    (let ((f (car args))
-	  (lists (cdr args)))
-      (if (<= (length lists) 3)  ;; uim's siod accepts up to 3 lists
-	  (apply mapcar args)    ;; faster native processing
-	  (iterate-lists (lambda (state elms)
-			   (if (null? elms)
-			       (cons #t (reverse state))
-			       (let ((mapped (apply f elms)))
-				 (cons #f (cons mapped state)))))
-			 () lists)))))
-
-(define for-each map)
-
 (define quotient /)	;; / in siod is quotient actually
 
-;;(define list-tail
-;;  (lambda (lst n)
-;;    (if (= n 0)
-;;	lst
-;;	(list-tail (cdr lst) (- n 1)))))
-(define list-tail
-  (lambda (lst n)
-    (if (or (< (length lst)
-	       n)
-	    (< n 0))
-	(error "out of range in list-tail")
-	(nthcdr n lst))))
-
 ;;
 ;; R5RS-like character procedures
 ;;
@@ -300,29 +226,6 @@
 	 (or (<= c 31)
 	     (= c 127)))))
 
-(define char-upper-case?
-  (lambda (c)
-    (and (integer? c)
-	 (>= c 65)
-	 (<= c 90))))
-
-(define char-lower-case?
-  (lambda (c)
-    (and (integer? c)
-	 (>= c 97)
-	 (<= c 122))))
-
-(define char-alphabetic?
-  (lambda (c)
-    (or (char-upper-case? c)
-	(char-lower-case? c))))
-
-(define char-numeric?
-  (lambda (c)
-    (and (integer? c)
-	 (>= c 48)
-	 (<= c 57))))
-
 (define char-printable?
   (lambda (c)
     (and (integer? c)
@@ -355,18 +258,6 @@
 	(- c 48)
 	c)))
 
-(define char-downcase
-  (lambda (c)
-    (if (char-upper-case? c)
-	(+ c 32)
-	c)))
-
-(define char-upcase
-  (lambda (c)
-    (if (char-lower-case? c)
-	(- c 32)
-	c)))
-
 ;;
 ;; backward compatibility: should be obsoleted
 ;;
@@ -604,18 +495,6 @@
 	    alist))))
 
 
-(define bitwise-and
-  (lambda xs
-    (fold bit-and (bitwise-not 0) xs)))
-
-(define bitwise-ior
-  (lambda xs
-    (fold bit-or 0 xs)))
-
-(define bitwise-xor
-  (lambda xs
-    (fold bit-xor 0 xs)))
-
 ;;
 ;; uim-specific utilities
 ;;



More information about the uim-commit mailing list