The site says a match over a bool needs no _ arm

This commit is contained in:
Joseph Ferano 2026-09-25 21:37:44 +07:00
parent 18581a452c
commit c3a05d7447

View File

@ -1098,7 +1098,7 @@ as <code>first-even</code> does above.</p>
<p><code>(Option T)</code> is how absence is spelled: a lookup miss, an empty
collection, the end of a stream. <code>match</code> works on an <code>Option</code>, a
<code>defdata</code> and an enum, whose arms name cases; on a <code>bool</code>, whose arms
are <code>true</code> and <code>false</code>; and on a number, a string or a
are <code>true</code> and <code>false</code> and need no <code>_</code>; and on a number, a string or a
<code>dyn</code>, whose arms are literals &mdash; <code>(match n 0 "zero" -1 "none" _ "some")</code>,
or over a <code>dyn</code> also keywords such as <code>:north</code>
&mdash; each compared with <code>=</code>, with a <code>_</code> arm required for the rest.