Elm Language Comparable data types


Example

Comparable types are primitive types that can be compared using comparison operators from Basics module, like: (<), (>), (<=), (>=), max, min, compare

Comparable types in Elm are Int, Float, Time, Char, String, and tuples or lists of comparable types.

In documentation or type definitions they are referred as a special type variable comparable, eg. see type definition for Basics.max function:

max : comparable -> comparable -> comparable