andre-dietrich/elm-conditional/1.0.0

Conditional.Set

A collection of conditional functions for working with sets.

Build

insertIf : Bool -> comparable -> Set comparable -> Set comparable

Conditional insert

insertWhen : Maybe comparable -> Set comparable -> Set comparable

Insert an element to a Set if it is not Nothing.

removeIf : Bool -> comparable -> Set comparable -> Set comparable

Conditional remove

removeWhen : Maybe comparable -> Set comparable -> Set comparable

Remove an element to a Set if it is not Nothing.

Combine

unionIf : Bool -> Set comparable -> Set comparable -> Set comparable

Conditional union

intersectIf : Bool -> Set comparable -> Set comparable -> Set comparable

Conditional intersection

diffIf : Bool -> Set comparable -> Set comparable -> Set comparable

Conditional diff

Transform

mapIf : Bool -> (comparable -> comparable) -> Set comparable -> Set comparable

Conditional map

filterIf : Bool -> (comparable -> Bool) -> Set comparable -> Set comparable

Conditional filter