guile-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile/guile-core/ice-9 format.scm


From: Marius Vollmer
Subject: guile/guile-core/ice-9 format.scm
Date: Tue, 27 Nov 2001 17:36:21 -0500

CVSROOT:        /cvs
Module name:    guile
Changes by:     Marius Vollmer <address@hidden> 01/11/27 17:36:21

Modified files:
        guile-core/ice-9: format.scm 

Log message:
        (string-index, list-head): Removed, we already these in the core.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/ice-9/format.scm.diff?cvsroot=OldCVS&tr1=1.12&tr2=1.13&r1=text&r2=text

Patches:
Index: guile/guile-core/ice-9/format.scm
diff -u guile/guile-core/ice-9/format.scm:1.12 
guile/guile-core/ice-9/format.scm:1.13
--- guile/guile-core/ice-9/format.scm:1.12      Fri Aug 31 10:42:30 2001
+++ guile/guile-core/ice-9/format.scm   Tue Nov 27 17:36:21 2001
@@ -1670,17 +1670,6 @@
 
 ;;; some global functions not found in SLIB
 
-;; string-index finds the index of the first occurence of the character `c'
-;; in the string `s'; it returns #f if there is no such character in `s'.
-
-(define (string-index s c)
-  (let ((slen-1 (- (string-length s) 1)))
-    (let loop ((i 0))
-      (cond
-       ((char=? c (string-ref s i)) i)
-       ((= i slen-1) #f)
-       (else (loop (+ i 1)))))))
-
 (define (string-capitalize-first str)  ; "hello" -> "Hello"
   (let ((cap-str (string-copy str))    ; "hELLO" -> "Hello"
        (non-first-alpha #f)            ; "*hello" -> "*Hello"
@@ -1694,12 +1683,6 @@
                (begin
                  (set! non-first-alpha #t)
                  (string-set! cap-str i (char-upcase c)))))))))
-
-(define (list-head l k)
-  (if (= k 0)
-      '()
-      (cons (car l) (list-head (cdr l) (- k 1)))))
-
 
 ;; Aborts the program when a formatting error occures. This is a null
 ;; argument closure to jump to the interpreters toplevel continuation.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]