by jose_zap · 2y ago · 0 comments
result <- do
a <- someEitherValue
b <- anotherEitherValue
return (doStuff a b)
In the above example the do notation will unwrap the values as an and b, but if one of the results is Left, the computation is aborted, returning the Left value.This is one just of the many techniques available to make error checking linear.
No comments yet.