A special mini monad implementation that allows us not to have to rely on Cats being
part of our dependencies as it's really heavy to use for this simple reason.
Cats also requires binding a future monad for Scala futures against a known ExecutionContextExecutor,
which unfortunately interferes with one of the core features in phantom, giving users the ability
to supply their own execution context whenever they want.
In our implementation, we go against the grain and include the implicit ExecutionContextExecutor as part
of the standard method signature for map and flatMap, and this is only because we want to keep enabling users
to supply their own context. Certain implementations of Futures will downright ignore this implicit parameter,
but it's there for the implementations of Future and Promise that need it, specifically Scala Standard Lib
scala.concurrent.Future and scala.concurrent.Promise.
Cats is a much better library in any conceivable way, and while we are not trying to reinvent category theory,
it's too heavy of a dependency to add for the sake of a single simple typeclass.
F
The type of the Future implementation for which we implement map and flatMap.
A special mini monad implementation that allows us not to have to rely on Cats being part of our dependencies as it's really heavy to use for this simple reason. Cats also requires binding a future monad for Scala futures against a known ExecutionContextExecutor, which unfortunately interferes with one of the core features in phantom, giving users the ability to supply their own execution context whenever they want.
In our implementation, we go against the grain and include the implicit ExecutionContextExecutor as part of the standard method signature for map and flatMap, and this is only because we want to keep enabling users to supply their own context. Certain implementations of Futures will downright ignore this implicit parameter, but it's there for the implementations of Future and Promise that need it, specifically Scala Standard Lib scala.concurrent.Future and scala.concurrent.Promise.
Cats is a much better library in any conceivable way, and while we are not trying to reinvent category theory, it's too heavy of a dependency to add for the sake of a single simple typeclass.
The type of the Future implementation for which we implement map and flatMap.