stoeffel/elm-verify/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

Verify.Set

Functions to verify properties of a Set.

notEmpty : error -> Validator error (Set a) (Set a)

Fails if a Set is empty.

import Set


notEmpty "error" <| Set.empty
--> Err [ "error" ]


notEmpty "error" <| Set.fromList [ (1, 1) ]
--> Ok <| Set.fromList [ (1, 1) ]