Skip to content

Glossary: Swift Basics

Comparable

A standard protocol that makes `<` work for a type, so it can be sorted with `sorted()` and `max()`. You write the `<` yourself.

Where the book teaches it

Related terms

EquatableHashableprotocol