----------------------------------------------------------------
- my brief chime-in on the "not found" policy of string-find/cursors string-find-right/cursors.
- my first preference would be to return #f for consistency with prior Scheme practice. It's
also so much easier to type "(if found ...)" than "(if (string-cursor<? string found
(string-cursor-end string)) ...)" It is cumbersome to have to invoke a 3-argument procedure call to
process the result when testing a boolean comes for free.
- There's some logic to returning where the cursor landed after deciding that the iterative
search has failed, so when searching the whole string, returning the post-end or pre-begin
cursor makes some sense. But when searching a sub-range from START to END, this logic would
dictate returning END or (string-cursor-prev START) on not-found. But this doc requires
returning the post-end or pre-begin cursor of the entire string instead.
----------------------------------------------------------------
- The first sentence under the "The whole string" section is "Returns the number of characters in
string", but this doesn't seem to go with any declared procedure. I'm guessing it's just lint
from and old version that never got cleaned up.
- string-split/cursors, "It is an error if limit is not a positive exact integer". I agree there is no
reasonable meaning for a negative limit, but a zero limit has a reasonable interpretation, returning
a list of just the original un-split string. So I suggest changing "positive" to "non-negative" here.
Since you referenced python, I gave it a whirl: "hello world".split(None,0) ==> ['hello world'].
"If separator is an empty string, then the returned list contains a list of strings, each of which
contains a single character". Does this mode make use of the LIMIT argument as well? The wording
and placement suggests it might bypass LIMIT's functionality, though it would be reasonable that
"hello" with limit 2 ==> ("h" "e" "llo").
- string-cursor->index, string-index->cursor, and string-cursor-difference are documented but
missing from the index section, where I think it belongs in the first sub-section named "String
cursors".
- string-compress/cursors is documented, but missing from the index section under
Padding,trimming,compressing.
- The index section has two "Padding,trimming,compressing" sub-sections, but I think the second
sub-header should say "Searching".
- Under Filtering & Partitioning in the index, there's a name "string-partition" which should be
"string-partition/cursors"
- The documentation for string-for-each-cursor strongly implies the START and END arguments are
ignored. Either those arguments should be removed, or the description should be corrected. It's
not obvious to me which was intended.
- The specifications for string-fold/cursors and string-fold-right/cursors have no START & END
parameters, and the last sentence of the text implies multiple strings could be provided, but the
procedure signature doesn't allow for this.
- string-skip/cursors is missing START & END parameters as well, but it's pretty obvious that was an
accidental omission.