Email list hosting service & mailing list manager

SRFI 130 - n+2 cursors Per Bothner (03 Dec 2015 19:06 UTC)
Re: SRFI 130 - n+2 cursors John Cowan (03 Dec 2015 20:56 UTC)
Re: SRFI 130 - n+2 cursors Alex Shinn (04 Dec 2015 04:12 UTC)

Re: SRFI 130 - n+2 cursors John Cowan 03 Dec 2015 20:56 UTC

Per Bothner scripsit:

> I'd like to see some better justification for this unusual choice.

The idea is that when iterating in reverse order, the pre-start cursor
serves the function of the post-end cursor when iterating normally.  Thus
span-find-right returns the pre-start when it can't find anything; returning
the post-end would be bizarre.  However, indexing is always done forward.
If the -right functions were flushed, the pre-start cursor could go too.

--
John Cowan          http://www.ccil.org/~cowan        xxxxxx@ccil.org
"The exception proves the rule."  Dimbulbs think: "Your counterexample proves
my theory."  Latin students think "'Probat' means 'tests': the exception puts
the rule to the proof."  But legal historians know it means "Evidence for an
exception is evidence of the existence of a rule in cases not excepted from."