Cindiary/elm-id/3.0.0

NOTE: the latest version is 7.1.0

ID.Set

type alias Set id =
Dict id ()

A set type for IDs, is equal to a ID.Dict with empty tuples as values

empty : Set (ID a)

Alias for ID.Dict.empty

fromList : List (ID a) -> Set (ID a)

Create a set from a list of IDs

toList : Set (ID a) -> List (ID a)

Alias for ID.Dict.ids

isEmpty : Set (ID a) -> Bool

Alias for ID.Dict.isEmpty

size : Set (ID a) -> Int

Alias for ID.Dict.size

member : ID a -> Set (ID a) -> Bool

Alias for ID.Dict.member

insert : ID a -> Set (ID a) -> Set (ID a)

Alias for ID.Dict.insert but without a value

remove : ID a -> Set (ID a) -> Set (ID a)

Alias for ID.Dict.remove

fold : (ID a -> c -> c) -> c -> Set (ID a) -> c

Alias for ID.Dict.fold but without a value argument

diff : Set (ID a) -> Set (ID a) -> Set (ID a)

Alias for ID.Dict.diff

intersect : Set (ID a) -> Set (ID a) -> Set (ID a)
union : Set (ID a) -> Set (ID a) -> Set (ID a)

Alias for ID.Dict.union

Json

encode : Set id -> Value

Encode Set to a JSON value

decoder : Decoder (Set id)

JSON Decoder for Set