glasserc/elm-form-result/2.0.0

NOTE: the latest version is 3.0.0

Form.Result.Utils

Some basic utilities that don't belong anywhere else.

errToMaybe : Result err a -> Maybe err

Extract the Err from a Result, if present.

ifNothing : Maybe a -> b -> Maybe b

Look for Nothing, using some other value to show you found it.

This comes in handy when you want to e.g. react to an absent field by raising an error, but don't need to do anything when the field is present.