Next: , Previous: , Up: loops comprehensions   [Index]


1.16.2.3 String accumulator loops

Syntax: string-ec ?qualifier ... expression

The string of all values of expression. Think of it as:

(list->string (list-ec ?qualifier ... expression))

Examples:

(string-ec              ;no qualifiers
  #\a)
⇒ (string #\a)

(string-ec (:range i 0)
  #\a)
⇒ ""

(string-ec (:range i 1)
  #\a)
⇒ "a"

(string-ec (:range i 2)
  #\a)
⇒ "aa"
Syntax: string-append-ec ?qualifier ... expression

The string obtained by appending all values of expression, which must all be strings. Think of it as:

(apply string-append (list-ec ?qualifier ... expression))

Examples:

(string-append-ec
  "ab")
⇒ "ab"

(string-append-ec (:range i 0)
  "ab")
⇒ ""

(string-append-ec (:range i 1)
  "ab")
⇒ "ab"

(string-append-ec (:range i 2)
  "ab")
⇒ "abab"