aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Utils/Either.elm
blob: 275fc8c4ed50f5d93ea124077a159b0e3f4b57ab (plain)
1
2
3
4
5
6
7
8
9
module Utils.Either exposing
  ( toMaybeError
  )

toMaybeError : Result a b -> Maybe a
toMaybeError result =
  case result of
    Ok _ -> Nothing
    Err x -> Just x