[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

string-for-each, string-iter

I noticed the procedure pair string-for-each and string-iter [*]. My
suggestion is that string-iter is dropped and that string-for-each is 
made do iterate from START to END. This is consistent with the list
version of for-each, which is guaranteed to apply PROC in
order. If a procedure can be applied in any order, it can't be a
restriction to apply it in order, thus an unordered version of
string-for-each is unnecessary. 

Are there efficiency/implementation advantages to have an unordered
version? In that case, another name than string-for-each seems

	Best regards,

[*] From SRFI-13:

string-for-each  proc s [start end] -> unspecified
string-iter      proc s [start end] -> unspecified
    Apply PROC to each character in S.
    STRING-FOR-EACH has no specified iteration order.
    STRING-ITER is required to iterate from START to END
    in increasing order. 

Lars Arvestad               Dept. of Numerical Analysis and Computing Science
                       Royal Institute of Technology (KTH), Stockholm, Sweden