chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] obsolete code


From: Jörg F . Wittenberger
Subject: Re: [Chicken-users] obsolete code
Date: 27 Sep 2011 10:30:13 +0200

On Sep 27 2011, Alex Shinn wrote:

On Tue, Sep 27, 2011 at 3:39 AM, Jörg F. Wittenberger
<address@hidden> wrote:
I found theses definitions in the irregex code mirroring srfi-1
simplified cases.

(define (filter pred ls)
 (let lp ((ls ls) (res '()))
  (if (null? ls)
      (reverse res)
      (lp (cdr ls) (if (pred (car ls)) (cons (car ls) res) res)))))

(define (remove pred ls)
 (let lp ((ls ls) (res '()))
  (if (null? ls)
      (reverse res)
      (lp (cdr ls) (if (pred (car ls)) res (cons (car ls) res))))))

The irregex code itself appears not to use them anywhere.

Irregex is designed so that (load "irregex.scm") will work
in any vaguely Scheme-like system.  In the near future I
plan on switching to the R7RS module system, but in the
meantime I have no interest in breaking that simplicity.

I do understand and really appreciate that goal.

But not including those two definitions should IMHO not do any harm.
I simply can not see where those would be used within irregex.scm.


/Jörg





reply via email to

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