Changeset 14820 in project


Ignore:
Timestamp:
05/28/09 07:46:45 (10 years ago)
Author:
Ivan Raikov
Message:

restored previous version of seq

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/lexgen/trunk/lexgen.scm

    r14819 r14820  
    8787(define (seq pats)
    8888  (lambda (streams)
    89     (let loop ((streams streams) (pats pats))
    90       (cond
    91        ((null? pats)  streams)
    92        ((pair? pats)  (let* ((pat      (car pats))
    93                              (streams1 (pat streams)))
    94                         (and streams1 (loop streams1 (cdr pats)))))
    95        (else #f)))))
     89    (fold (lambda (f s) (f s)) streams pats)))
    9690
    9791;; This matches any of a list of patterns. It's analogous to a series
Note: See TracChangeset for help on using the changeset viewer.