der#Strict_total_order">strict total order</a>.</p>

<p>A type conforming to <code>Comparable</code> need only supply the <code>&lt;</code> and
<code>==</code> operators; default implementations of <code>&lt;=</code>, <code>&gt;</code>, <code>&gt;=</code>, and
<code>!=</code> are supplied by the standard library:</p>

<pre><code class="language-swift">struct Singular : Comparable {}
func ==(x: Singular, y: Singular) -&gt; Bool { return true }
func &lt;(x: Singular, y: Singular) -&gt; Bool { return false }</