stoeffel / elm-verify / Maybe.Verify

Functions to verify properties of a Maybe.

isJust : error -> Verify.Validator error (Maybe a) a

Fails if a Maybe is Nothing.

isJust "error" Nothing
--> Err ( "error" , [])


isJust "error" (Just 42)
--> Ok 42 -- It removes the wrapper as well!