chickadee » srfi-135 » text-unfold-right

(text-unfold-right stop? mapper successor seed [base make-final]) → textprocedure

This is a fundamental constructor for texts. It is the same as text-unfold except the results of mapper are assembled into the text in right-to-left order, base is the optional rightmost portion of the constructed text, and make-final produces the leftmost portion of the constructed text.

(text-unfold-right (lambda (n) (< n (char->integer #\A)))
                   (lambda (n) (char-downcase (integer->char n)))
                   (lambda (n) (- n 1))
                   (char->integer #\Z)
                   #\space
                   (lambda (n) " The English alphabet: "))
  ⇒ « The English alphabet: abcdefghijklmnopqrstuvwxyz »