Class Trampoline.Codense<A>
java.lang.Object
fj.control.Trampoline<A>
fj.control.Trampoline.Codense<A>
- Enclosing class:
Trampoline<A>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final F<Object, Trampoline<A>> private final Trampoline.Normal<Object> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCodense(Trampoline.Normal<Object> t, F<Object, Trampoline<A>> k) -
Method Summary
Modifier and TypeMethodDescription<B> Trampoline<B> bind(F<A, Trampoline<B>> f) Binds the given continuation to the result of this trampoline.<R> Rfold(F<Trampoline.Normal<A>, R> n, F<Trampoline.Codense<A>, R> gs) Either<P1<Trampoline<A>>, A> resume()Runs a single step of this computation.
-
Field Details
-
sub
-
cont
-
-
Constructor Details
-
Codense
-
-
Method Details
-
fold
- Specified by:
foldin classTrampoline<A>
-
bind
Description copied from class:TrampolineBinds the given continuation to the result of this trampoline.- Specified by:
bindin classTrampoline<A>- Parameters:
f- A function that constructs a trampoline from the result of this trampoline.- Returns:
- A new trampoline that runs this trampoline, then continues with the given function.
-
resume
Description copied from class:TrampolineRuns a single step of this computation.- Specified by:
resumein classTrampoline<A>- Returns:
- The next step of this compuation.
-