Callback that can short-circuit along the way when conditions you specify, aren't met.
Especially useful for event handlers such as key handlers, drag-and-drop handlers, etc, where you check a condition, perform an effect, check another condition, perform another effect, etc.
This is meant to be lightweight, and be immediately useful without the typical pain of imports, implicit conversions and extension methods then normally accompany monad transforms in Scala.
For a more generic (i.e. beyond Option) or comprehensive monad transformer use Cats or similar.
- Companion
- object
Value members
Concrete methods
Alias for >>
.
Alias for >>
.
Where >>
is often associated with Monads, *>
is often associated with Applicatives.
Sequence actions, discarding the value of the second argument.
Sequence actions, discarding the value of the second argument.
Sequence a callback to run before this, discarding any value produced by it.
Sequence a callback to run before this, discarding any value produced by it.
Sequence a callback to run after this, discarding any value produced by this.
Sequence a callback to run after this, discarding any value produced by this.
Discard the value produced by this callback.
Discard the value produced by this callback.
This method allows you to be explicit about the type you're discarding (which may change in future).
Conditional execution of this callback.
Conditional execution of this callback.
- Value Params
- cond
The condition required to be
true
for this callback to execute.