MapSet.put

You're seeing just the function put, go back to MapSet module for more information.

Specs

put(t(val), new_val) :: t(val | new_val) when val: value(), new_val: value()

Inserts value into map_set if map_set doesn't already contain it.

Examples

iex> MapSet.put(MapSet.new([1, 2, 3]), 3)
#MapSet<[1, 2, 3]>
iex> MapSet.put(MapSet.new([1, 2, 3]), 4)
#MapSet<[1, 2, 3, 4]>