Mickey Donaghy
10/07/2020, 1:24 AMsuspend fun () -> Unit s don't form a monad because they aren't values. But assuming there was a monad type like IO, you'd want to use a monad transformer like EitherT<IO, A, B> (in some cases) because it's easier to compose than IO<Either<A, B>> . Think of how you'd compose IO<Either<A, B>> and f : B -> IO<Either<A, C>> , you'd have to use multiple nested `flatMap`s - a monad transformer like EitherT takes care of that plumbing for you.