Next: srfi eager-comp design, Previous: srfi eager-comp rationale, Up: srfi eager-comp [Index]
A comprehensions is a hygienic referentially transparent macro in the
sense of R5RS Section 4.3. The macros extend the
<expression>–syntax defined in R5RS Section 7.1.3. The main
syntactic pattern used for defining a comprehension is
<qualifier>, representing a generator or a filter. It is defined
in Section “Qualifiers”.
The most important instances of
<qualifier> are generators.
These are defined in Section “Generators”. Generators come in three
flavors, as typed generators (
:range, etc.), as the
: (pronounced as “run through”), and as
combined and modified generators (
:until). Most generators in this SRFI also support an
optional index variable counting the values being generated.
Finally, it is explained how to add a new application–specific comprehension, how to add a new application–specific typed generator, and how to add a new application–specific dispatching generator. As this concerns code unknown at the time this is being written, the explanation should not be taken as a specification in the literal sense. It rather suggests a convention to follow in order to ensure new comprehensions and generators blend seamlessly with the ones defined in this SRFI.
|• srfi eager-comp spec comprehensions:||Comprehensions.|
|• srfi eager-comp spec qualifiers:||Qualifiers.|
|• srfi eager-comp spec generators:||Generators.|
|• srfi eager-comp spec suggest:||Suggestions for application specific extensions.|