> On Feb 6, 2016, at 11:13 AM, Matt Wette <[email protected]> wrote:
> If not a macro could be written to generate a match function which can 
> memoize the make-regexp part.
> (define regex-matcher foo ((<pattern> …) 
> => 
> (define (let ((t-123 (make-regex <pattern>)) …) (lambda (str) (cond 
> ((regexp-exec t-123 str) ...

oops.  Should read:

(define-regex-matcher foo ((<pattern> …)
=>
(define foo 
   (let ((t-123 (make-regexp <pattern>)) …) 
      (lambda (str) 
        (cond ((regexp-exec t-123 str) … (else <body>))))) 



Reply via email to