|
|
Warp wrote:
> Orchid XP v7 <voi### [at] devnull> wrote:
>> Notice that a string is a *single-linked* list. (I.e., there are "next"
>> pointers but no "prev" pointers.)
>
> You can't random-access a string in haskell? You can just go through it
> once and that's it? That would be quite limiting...
Not unless you transform it into something else first.
(This "ByteString" thing I keep harping on about gives you something
like O(n/k) random access time, for some implementation-dependent k.)
Typically, if you read a text string, you're probably going to feed it
into some kind of parser, and then manipulate the resulting parse tree.
And parsing only requires linear access.
Post a reply to this message
|
|