diff options
Diffstat (limited to 'src/client/elm/Utils/Either.elm')
-rw-r--r-- | src/client/elm/Utils/Either.elm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/elm/Utils/Either.elm b/src/client/elm/Utils/Either.elm new file mode 100644 index 0000000..10c40e3 --- /dev/null +++ b/src/client/elm/Utils/Either.elm @@ -0,0 +1,9 @@ +module Utils.Either + ( toMaybeError + ) where + +toMaybeError : Result a b -> Maybe a +toMaybeError result = + case result of + Ok _ -> Nothing + Err x -> Just x |