stoeffel/elm-verify/2.0.1

NOTE: this package is not compatible with Elm 0.19.1

Set.Verify

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) ]