stoeffel/elm-verify/5.0.0

List.Verify

Functions to verify properties of a List.

notEmpty : error -> List a -> Result ( error, List error ) (List a)

Fails if a List is empty.

notEmpty "error" []
--> Err ( "error" , [])


notEmpty "error" [1]
--> Ok [1]