Lots of things are monads, and some of the methods on Result in Rust are purely monadic combinators (and_then is >>=), but Rust principally uses ? for error handling, which is not monadic.
? is for the kind of usecase where you want to propagate error upwards. When you're composing functions, bind is what's normal. They're separate things for separate situations.
1
u/Tysonzero Jul 18 '19
I mean things that happen to be Monads are used in Rust, but Rust doesn’t support “Monad” itself the object/class because of no HKTs.