Build a new activity by applying f
to each value.
Build a new activity by applying f
to each value. When
f
is not defined for this activity's current value, the derived
activity becomes pending.
The activity which behaves as f
applied to Ok values.
Join two activities.
Map a T-typed activity to a U-typed one.
Sample the current value of this activity.
Sample the current value of this activity. Sample throws an exception if the activity is in pending state or has failed.
An Event of states.
The activity which behaves as f
to the state
of this activity.
An Event containing only nonpending values.
An Activity is a handle to a concurrently running process, producing T-typed values. An activity is in one of three states:
An activity may transition between any state at any time.
(The observant reader will notice that this is really a monad transformer for an Op monad over Var where Op is like a Try with an additional pending state.)