chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] grep should use string-search?


From: Felix Winkelmann
Subject: Re: [Chicken-users] grep should use string-search?
Date: Tue, 10 Aug 2004 07:32:51 +0200
User-agent: Opera M2/7.52 (Win32, build 3834)

On Tue, 10 Aug 2004 00:26:11 -0500, Alejandro Forero Cuervo <address@hidden> wrote:

> That's reasonable. Especially since string-search is the same
> as string-match "^...$".

The other way around, OF COURSE!

Exactly.  One can get any of the two possible behaviours by using
"^expr$" or  ".*expr.*", regardless  of whether  string-search or
string-match is used; however, a default of "string-search" would
be more consistent with what "grep" usually does.

I'll   have  the   stream-grep  routine   to  use   string-search
then.

By the way,  expect interesting additions to  stream-ext (such as
iterator->stream, allowing

  (define (list->stream l)
    (iterator->stream
      (lambda (collect stop)
        (for-each collect l)))) ,

with-output-to-stream  and   with-input-from-stream  [of  chars],
etc.). :)


I'm eagerly expecting... :-)


cheers,
felix




reply via email to

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