ptal / expected

What did you expect?
113 stars 18 forks source link

Add a catch_all adaptor #42

Open viboes opened 10 years ago

viboes commented 10 years ago

Expected can be viewed as interfacing between a monadic code and an exception-throwing code. It could be convenient to have an adaptor that catch all the exception thrown and transform then on a expected <exception_ptr, T>.

This adaptor could be used with fmap, mbind and then method.

e.mbind(catch_all(f));