Changeset 15197 in project for release/4/ssax/SSAX.scm


Ignore:
Timestamp:
07/09/09 02:23:19 (11 years ago)
Author:
Ivan Raikov
Message:

applied ssax patch from ticket #58

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/ssax/SSAX.scm

    r15175 r15197  
    627627     (else
    628628      (loop (cdr alist) (cons (car alist) scanned))))))
     629
     630; From SRFI-1
     631(define (fold-right kons knil lis1)
     632    (let recur ((lis lis1))
     633       (if (null? lis) knil
     634            (let ((head (car lis)))
     635              (kons head (recur (cdr lis)))))))
     636
     637; Left fold combinator for a single list
     638(define (fold kons knil lis1)
     639  (let lp ((lis lis1) (ans knil))
     640    (if (null? lis) ans
     641      (lp (cdr lis) (kons (car lis) ans)))))
     642
    629643
    630644
Note: See TracChangeset for help on using the changeset viewer.