# Declaring

Sets are unordered collections of values of the same type, like lists
are ordered collections. Like the mathematical sets and lists, sets
can be empty and, if not, elements of sets in LIGO are *unique*,
whereas they can be repeated in a *list*.

Like lists, the type of sets is parameterised over the type of its elements. Like list elements, set elements must all have the same type.

The empty set is denoted by the predefined value `Set.empty`

. A
non-empty set can be built by using the function `Set.literal`

which
takes a list of *literal elements* and returns a set containing them,
and only them.

Note: The element

`2`

is repeated in the list, but not in the set made from it.

Note: See the predefined namespace Set

If you want to build a big set from an arbitrary list of arbitrary
values (not just literal values), then you must use `Set.of_list`

instead of `Set.literal`

:

Set elements are internally sorted by increasing values, so the type
of the elements must be *comparable*, that is, they obey a total order
(any two elements can be compared).