/[guile]/guile/guile-core/srfi/srfi-1.scm
ViewVC logotype

Diff of /guile/guile-core/srfi/srfi-1.scm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.27 by kryde, Mon Jul 28 23:43:51 2003 UTC revision 1.28 by kryde, Mon Jul 28 23:54:39 2003 UTC
# Line 414  Line 414 
414    
415  ;;; Miscelleneous: length, append, concatenate, reverse, zip & count  ;;; Miscelleneous: length, append, concatenate, reverse, zip & count
416    
 (define (length+ clist)  
   (if (null? clist)  
     0  
     (let lp ((hare (cdr clist)) (tortoise clist) (l 1))  
       (if (null? hare)  
         l  
         (let ((hare (cdr hare)))  
           (if (null? hare)  
             (+ l 1)  
             (if (eq? hare tortoise)  
               #f  
               (lp (cdr hare) (cdr tortoise) (+ l 2)))))))))  
   
417  (define (append-reverse rev-head tail)  (define (append-reverse rev-head tail)
418    (let lp ((l rev-head) (acc tail))    (let lp ((l rev-head) (acc tail))
419      (if (null? l)      (if (null? l)

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26