string-for-each -- r7rs Definition functor;
string-for-each (from vonuvoli);Procedure variants:
((for-each-procedure string |1...|) -> (undefined))
for-each-procedure;string;... -- at least one time;undefined;scheme:base -- (scheme base);scheme -- (scheme);(string-for-each proc string_1 string_2 ...)Domain: It is an error if
procdoes not accept as many arguments as there arestrings.The arguments to
string-for-eachare like the arguments tostring-map, butstring-for-eachcallsprocfor its side effects rather than for its values. Unlikestring-map,string-for-eachis guaranteed to callprocon the elements of thelists in order from the first element(s) to the last, and the value returned bystring-for-eachis unspecified. If more than onestringis given and not all strings have the same length,string-for-eachterminates when the shortest string runs out. It is an error forprocto mutate any of the strings.(let ((v '())) (string-for-each (lambda (c) (set! v (cons (char->integer c) v))) "abcde") v) ===> (101 100 99 98 97)
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.