Changeset 15175 in project


Ignore:
Timestamp:
07/07/09 06:59:31 (10 years ago)
Author:
Ivan Raikov
Message:

removed definitions of fold from ssax (uses srfi-1)

Location:
release/4/ssax
Files:
2 edited

Legend:

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

    r14581 r15175  
    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 
    643629
    644630
  • release/4/ssax/ssax-chicken.scm

    r14581 r15175  
    55
    66(module ssax
     7
    78((ssax:make-parser fold)
    89 (ssax:make-pi-parser fold)
Note: See TracChangeset for help on using the changeset viewer.