This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Bug in shared substrings?



john.redford@fmr.com writes:
> Good enough then. But this leaves me with a naive Scheme question. What is
> the closest way in Scheme to approximate C's space & time efficient
> iteration over the elements in a mutable string? string->list/list->string
> are very elegant, but don't seem to have the right properties.  I can
> imagine this role being filled by an efficient implementation of
> string->vector or mutable-string-as-vector. The former name is better, but I
> dot think anyone would expect vector-set! to modify the string as well;
> still, it would be better than string->list for immutable or copy-on-write
> strings.
> 

Why not just use string-ref, string-set!, and an appropriate loop or
tail recursion to iterate the index?

 - Maciej