How to properly propagate an error through non-error function?
Let’s say i want to use a function F : (A -> B) -> C
which i cannot modify. I, however, want to pass a function g : A -> Result<B, Err>
as an argument instead.
I would want a function G : (A -> Result<B, Err>) -> Result<C, Err>
that would “propagate” any error resulting from calling g
.