Suspension Helper
class SuspensionHelper<A>(toSucceed: (A) -> Unit, toFail: (A_BasicObject) -> Unit)
Content copied to clipboard
A helper class for making fiber suspension syntax more articulate. It provides succeed and fail methods that client code can invoke.
Parameters
to Succeed
The function to call that accepts a value from the Primitive if the Primitive is successful.
to Fail
The function to call that accepts an A_BasicObject that provides the reason for the Primitive failure.
Constructors
Link copied to clipboard
fun <A> SuspensionHelper(toSucceed: (A) -> Unit, toFail: (A_BasicObject) -> Unit)
Content copied to clipboard
Construct a SuspensionHelper.