Monad
trait Monad[m: Type -> Type] with Applicative[m]SourceA trait for applicatives that support monadic bind (flatMap), i.e., allow to apply a function
that takes a normal value and produces a monadic value to a monadic value. That is, the bind mechanism
supports extraction of monadic values, or, viewed differently, allows to combine (flatten) nested
monadic values (flapMap can be understood as a Functor.map followed by a flatten).
Signatures
Module Definitions
<=< is an operator alias for kleisliRight.
=<< is an operator alias for flatMap.
>=> is an operator alias for kleisliLeft.
>>= is the operator =<< with its arguments flipped.
>>= is the monadic bind operator.
The monadic join operator.
Flatten x - a monadic action nested in an outer monadic layer - to a single layer.
E.g. for the Option monad: flatten(Some(Some(1))) becomes Some(1).