Next: , Previous: , Up: rope API   [Contents][Index]


2.10 Eager comprehensions

Eager comprehensions are an extensible mechanism defined in SRFI-42. This section can only make sense once one has read the relevant portions of that SRFI. For the practical usage of the terms defined below, look at the examples using eager comprehension.

Syntax: rope-ec etc1 etc … s

This macro is an eager comprehension: a rope builder for SRFI-42 string generators. It is building the rope by performing the balancing algorithm on the spot with all the generated strings. It also ensures that all the strings are immutable by making read-only copies if necessary.

Procedure: :rope-dispatch args

This procedure is a string generator from a rope: given a rope, it will generate one by one all its leaves as strings, in order from left to right.