Email list hosting service & mailing list manager

Final SRFI 156: Syntactic combiners for binary predicates Arthur A. Gleckler 18 Dec 2017 23:16 UTC

Scheme Request for Implementation 156,
"Syntactic combiners for binary predicates,"
by Panicz Maciej Godek,
has gone into "final" status.

The document and an archive of the discussion are available
at <>.

Here's the abstract:

Recognizing binary predicates as a specific area in which
the use of prefix operators is an impediment, we propose a
thin layer of "syntactic stevia" for in-fixing such
predicates. It can be implemented using regular Scheme
macros. We suggest that the code (is x < y) should be
transformed to (< x y), and (is x < y <= z) -- to (let ((y*
y)) (and (< x y*) (<= y* z))).  In addition, we suggest
special meaning to the _ symbol: (is _ < y) and (is x < _)
should be transformed to (lambda (_) (< _ y)) and (lambda
(_) (< x _)), respectively.  This SRFI document anlso
describes some other uses of the is macro and its

Note that tests are now included in the reference
implementation.  They can be seen in the diff from the
previous draft:



SRFI Editor