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?
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users