[racket-dev] `regexp-explode' etc + poll

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Mar 13 11:04:34 EDT 2012

I'm sorry that I missed this before, but I have a couple of minor

At Tue, 13 Mar 2012 10:57:51 -0400, Eli Barzilay wrote:
> On January 1st, Eli Barzilay wrote:
> > I've implemented a new `regexp-explode' function.  It accepts the same
> > arguments as `regexp-match*' and `regexp-split', but with two
> > additional keyword arguments:
> > 
> >   * #:select-match
> > 
> >     If this is #t (the default) then the result includes the lists of
> >     results from the sub-matches.  It can also be #f to not include
> >     them, and it can be a "selector function" that chooses a specific
> >     one (eg, `car' etc) or return a different list of matches (eg,
> >     `cdr').

I think it doesn't work well to have #f vs. #t vs. something else. How
about #f vs. 'all vs. something else?

> >   * #:select-gap
> > 
> >     This is just a boolean flag -- if it's #t (the default), the
> >     strings between the matches are returned as well -- interleaved
> >     with the (lists of) matches, otherwise they're omitted.

Should this be `#:select-gap?'?

Or maybe it's better again to replace #t with a symbol, leaving the
name without a "?" in anticipation of additional future options.

Posted on the dev mailing list.