Run a program on an input, then continue with what became of it.
One round trip to the world, which the airlock decides: what a tool asks
for to carry out an intent. A read, a write, git diff and a web request
to a chat are all actions, each one program on an input, and each has
exactly one Outcome.
The continuation travels with the action, not in the tool, so one tool can serve concurrent calls without keeping state for any of them. It is private: what it is given comes from next, never from whoever holds the action.
Typed only by the answer it leads to, A. The program's input and output
types stay inside, where next uses them, so whoever holds an action
never handles either, and a switch over a Result covers every action
with case Action(). Dart's generics are covariant: a caller passing an
outcome to the continuation itself would be checked only when it ran.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
map<
B> (B f(A answer)) → Action< B> -
This result with its answer, once there is one, given to
f.override -
next(
ProposesActions proposer) → Future< Result< A> > -
This action proposed through
proposer, and the result it leads to. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited