[Top][All Lists]

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

Re: regex-case

From: Matt Wette
Subject: Re: regex-case
Date: Sat, 06 Feb 2016 11:23:12 -0800

> On Feb 6, 2016, at 11:13 AM, Matt Wette <address@hidden> 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

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