[r6rs-discuss] [Formal] String positions and string slices

Joe Marshall jmarshall at alum.mit.edu
Tue Apr 10 15:51:39 EDT 2007


On 4/10/07, Marcin 'Qrczak' Kowalczyk <qrczak at knm.org.pl> wrote:
> Dnia 09-04-2007, pon o godzinie 19:12 -0400, William D Clinger
> napisał(a):
>
> > (text-position=? position1 position2)
> >
> > True iff both positions identify the same positions within
> > the same text.  Should run in O(1) time.
>
> If text is immutable, then the concept of "same text" is unclear:
>
> • If it means eqv?, then achieving O(1) is impractical.
>
> • If it means eq?, then it distinguishes cases for which there is
>  no practical reason to distinguish them (when distinct text objects
>  contain equivalent text).

If text is immutable, it may be interned.

-- 
~jrm


More information about the r6rs-discuss mailing list