On 19 September 2012 03:59, Chris K. Jester-Young <cky...@gmail.com> wrote:
> (define* (regexp-split pat str #:optional (limit 0))
> […]
>     (reverse (if (zero? limit)
>                  (drop-while string-null? final)
>                  final))))
>

Please simplify this limit arg, removing the maybe-drop-empty-strings
behaviour.  Either positive limit or #f for all matches.  It is
trivial for the caller to remove the empty strings if desired, and
simplifies the docs for regexp-split.  Matching perl semantics is not
necessarily desirable.

The discussion following the previous thread (started by Nala) is
quite useful.  Semantics of many other implementations were examined
and a good summary later included.  (Which does remind me to get back
to that TODO list…)

Regards

Reply via email to