These examples (and others in the test file) give the misleading impression that the else keyword is meaningful in match. In fact, what these are doing is binding a variable called else. The equivalent of else in match is _.
It should probably be explicitly documented that else has no special meaning in match, as (for example) Racket does.
https://github.com/ashinn/chibi-scheme/blob/05c546e38d886a660018c6d9a3c6bec2bcf325d7/lib/chibi/match/match.scm#L131
https://github.com/ashinn/chibi-scheme/blob/05c546e38d886a660018c6d9a3c6bec2bcf325d7/lib/chibi/match-test.sld#L31
https://github.com/ashinn/chibi-scheme/blob/05c546e38d886a660018c6d9a3c6bec2bcf325d7/lib/chibi/match-test.sld#L36
These examples (and others in the test file) give the misleading impression that the
else
keyword is meaningful inmatch
. In fact, what these are doing is binding a variable calledelse
. The equivalent ofelse
inmatch
is_
.It should probably be explicitly documented that
else
has no special meaning inmatch
, as (for example) Racket does.