[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] irregex.scm
From: |
Jörg F . Wittenberger |
Subject: |
[Chicken-users] irregex.scm |
Date: |
26 Sep 2011 20:56:25 +0200 |
While I've been tampering with the irregex code I found that adding this
(define-compiler-syntax any
(syntax-rules ()
((_ pred ls)
(and (pair? ls)
(let lp ((head (car ls)) (tail (cdr ls)))
(if (null? tail)
(pred head)
(or (pred head) (lp (car tail) (cdr tail)))))))))
(define-compiler-syntax every
(syntax-rules ()
((_ pred ls)
(or (null? ls)
(let lp ((head (car ls)) (tail (cdr ls)))
(if (null? tail)
(pred head)
(and (pred head) (lp (car tail) (cdr tail)))))))))
to irregex.scm (before define-compiler-syntax reverse ) would not do any
harm. The corresponding definition in irregex-core.scm would then be
obsolete.
I have no idea how much the gain/cost ration would be.
Anybody who does?
- Re: [Chicken-users] a memory issue; mildly scaring to me, (continued)
- Re: [Chicken-users] a memory issue; mildly scaring to me, Jörg F . Wittenberger, 2011/09/26
- Re: [Chicken-users] a memory issue; mildly scaring to me, Jörg F . Wittenberger, 2011/09/26
- Re: [Chicken-users] a memory issue; mildly scaring to me, Jörg F . Wittenberger, 2011/09/26
- Re: [Chicken-users] a memory issue; mildly scaring to me, John Cowan, 2011/09/26
- Re: [Chicken-users] a memory issue; mildly scaring to me, Jörg F . Wittenberger, 2011/09/26
- Re: [Chicken-users] a memory issue; mildly scaring to me, Peter Bex, 2011/09/26
- Re: [Chicken-users] a memory issue; mildly scaring to me, Jörg F . Wittenberger, 2011/09/26
- [Chicken-users] define-compilter-syntax / define-syntax -- a quastion // posibly a bug, Jörg F . Wittenberger, 2011/09/26
- Re: [Chicken-users] a memory issue; mildly scaring to me, Jörg F . Wittenberger, 2011/09/26
- [Chicken-users] obsolete code, Jörg F . Wittenberger, 2011/09/26
- [Chicken-users] irregex.scm,
Jörg F . Wittenberger <=
- Re: [Chicken-users] obsolete code, Alex Shinn, 2011/09/26
- Re: [Chicken-users] obsolete code, Jörg F . Wittenberger, 2011/09/27
- Re: [Chicken-users] obsolete code, Alex Shinn, 2011/09/27