Cindiary/elm-id/2.0.0

NOTE: the latest version is 7.1.0

ID.Set

type alias Set counter id =
Dict counter 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 counter (ID a) -> List (ID a)

Alias for `ID.Dict.ids'

isEmpty : Set counter (ID a) -> Bool
size : Set counter (ID a) -> Int

Alias for `ID.Dict.size'

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

Alias for `ID.Dict.insert' but without a value

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

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

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

Alias for `ID.Dict.diff'

intersect : Set counter1 (ID a) -> Set counter2 (ID a) -> Set counter1 (ID a)
union : Set counter1 (ID a) -> Set counter2 (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