string-map -- r7rs Definition functor;
string-map (from vonuvoli);Procedure variants:
((map-procedure string |1...|) -> (any))
map-procedure;string;... -- at least one time;any;scheme:base -- (scheme base);scheme -- (scheme);(string-map proc string_1 string_2 ...)Domain: It is an error if
procdoes not accept as many arguments as there arestrings and return a single character.The
string-mapprocedure appliesprocelement-wise to the elements of thestrings and returns a string of the results, in order. If more than onestringis given and not all strings have the same length,string-mapterminates when the shortest string runs out. The dynamic order in whichprocis applied to the elements of thestrings is unspecified. If multiple returns occur fromstring-map, the values returned by earlier returns are not mutated.(string-map char-foldcase "AbdEgH") ===> "abdegh" (string-map (lambda (c) (integer->char (+ 1 (char->integer c)))) "HAL") ===> "IBM" (string-map (lambda (c k) ((if (eqv? k #\u) char-upcase char-downcase) c)) "studlycaps xxx" "ululululul") ===> "StUdLyCaPs"
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.