[racket-dev] `regexp-match**'

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Sat Jun 4 23:11:03 EDT 2011

You wrote:

 (define (regexp-match* . xs)
   (apply regexp-match** car xs))

I'm asking why it's not just this instead:

(define (regexp-match* . xs)
  (map car (apply regexp-match** xs))

Why does regexp-match** need to do the mapping?

Carl Eastlund

On Sat, Jun 4, 2011 at 7:17 PM, Eli Barzilay <eli at barzilay.org> wrote:
> 50 minutes ago, Carl Eastlund wrote:
>> Why does regexp-match** need to take this extra argument?  Can't we
>> just use map like normal?
>
> I can't parse this.
>
>
>> If we want users to process each match in turn, possibly to allow
>> early garbage collection, it sounds like an in-regexp-matches
>> sequence would be better.
>
> There might be a place for `in-regexp-whatever's, but that's
> irrelevant to adding the function I'm talking about.



Posted on the dev mailing list.