if<?

[syntax] if=? c consequent [alternate]

[syntax] if<? c consequent [alternate]

[syntax] if>? c consequent [alternate]

[syntax] if<=? c consequent [alternate]

[syntax] if>=? c consequent [alternate]

[syntax] if-not=? c consequent [alternate]

SRFI-67: These six macros are 2-way conditionals for comparisons. First c is evaluated, resulting in value C. The value C must be an exact integer in {-1, 0, 1}, otherwise an error is signalled. Then, depending on the value of C and the name of the macro, either consequence or alternate is evaluated, and the resulting value is the value of the conditional expression.

The branch is chosen according to the following table:

consequent alternate
if=? C = 0 C = -1 or 1
if<? C = -1 C = 0 or 1
if>? C = 1 C = -1 or 0
if<=? C = -1 or 0 C = 1
if>=? C = 0 or 1 C = -1
if-not=? C = -1 or 1 C = 0