Joey. Yours was the best answer. And you already stated it. Sorry for 
making you repeat yourself. Thank you. I will need to 
checkout Maybe.andThen, Result.andThen, Maybe.map and Result.map.

And then see if I still have anything to complain about :)

On Thursday, September 8, 2016 at 10:24:12 AM UTC-7, Joey Eremondi wrote:
>
> @Dave Ford: that's literally what Maybe.andThen and Result.andThen are 
> for. See also Maybe.map, and Result.map.
>
> They let you chain together several computations that may throw an 
> exception. You can take a computation which throws an exception, and a 
> computation which expects a non-exception argument, and compose them into a 
> new computation that throws an exception. Use map when the computation 
> taking the argument throws no exception, and use andThen when it can itself 
> throw an exception.
>
> Using these, you can handle your exceptions as high or as low in the 
> program logic as you'd like. You can let the exceptions bubble up using 
> andThen and map.
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to