This module implements the flatMap
combinator for Result
. This allows you to call functions
that return a Result
with arguments that are also Result
s without having to worry about ending up
with a Result (Result a)
return type.
In the event of an error only the first error is returned as there is no monoid in Elm and its annoying to have to pass in a concatenation function.
flatMap : (a -> Result x b) -> Result x a -> Result x b
flatMap2 : (a -> b -> Result x c) -> Result x a -> Result x b -> Result x c
flatMap3 : (a -> b -> c -> Result x d) -> Result x a -> Result x b -> Result x c -> Result x d
flatMap4 : (a -> b -> c -> d -> Result x e) -> Result x a -> Result x b -> Result x c -> Result x d -> Result x e
flatMap5 : (a -> b -> c -> d -> e -> Result x f) -> Result x a -> Result x b -> Result x c -> Result x d -> Result x e -> Result x f