Next: SRFI-13 Replicate/Rotate, Previous: SRFI-13 Reverse/Append, Up: SRFI-13
string-map, string-for-each etc. are for iterating over
the characters a string is composed of. The fold and unfold procedures
are list iterators and constructors.
Return a new string made by mapping procedure proc over s. proc is a character-to-character procedure. The order in which the procedure is applied to the string elements is not specified.
Map procedure proc over s, modifying it in-place. proc is a character-to-character procedure. The order in which the procedure is applied to the string elements is not specified.
Fold kons over the characters of s, with knil as the terminating element, from left to right. kons is called with two arguments: The actual character and the last result of kons' application.
Return a new string constructed as specified by procedures p, f, and g, given an initial value seed. More precisely:
- g is used to generate a series of seed values from the initial seed: seed, (g seed), (g^2 seed), (g^3 seed), ...
- p tells us when to stop — when it returns true when applied to one of these seed values.
- f maps each seed value to the corresponding character in the result string. These chars are assembled into the string in a left-to-right order.
- base is the optional initial/leftmost portion of the constructed string. It defaults to the empty string.
- make-final is applied to the terminal seed value (on which p returns true) to produce the final/rightmost portion of the constructed string. It defaults to
(lambda (x) "").