On 30 December 2011 19:47, Nala Ginrut <nalagin...@gmail.com> wrote:
> Forget to load (srfi-1 iota) ,again...
>
>
> On Fri, Dec 30, 2011 at 7:40 PM, Nala Ginrut <nalagin...@gmail.com> wrote:
>>
>> Great! It's better now.
>> Here's the brand new patch~

I notice that this does not handle the case where there are no matches:

scheme@(guile-user)> (regexp-split "[^0-9]" "123")
$26 = ((""))


  (let ((ret (fold-matches
              regex str (list '() 0 '(""))

becomes:

  (let ((ret (fold-matches
              regex str (list '() 0 str)

and the result:

scheme@(guile-user)> (regexp-split "[^0-9]" "123")
$28 = ("123")
scheme@(guile-user)> (string-split "123" #\!)
$29 = ("123")


I also note that you are using `substring/shared' when I think you are
after `substring'.  Both of these are efficient and use shared memory
when they can, but there is a difference.

Reply via email to