apply<S2, F2> method

Task<S2, F2> apply<S2, F2>(
  1. Res<S2, F2> onRun(
    1. Res<S, F> re
    )
)

Applies a function to the result of the task, allowing for transformations of both success and failure values.

Implementation

Task<S2, F2> apply<S2, F2>(Res<S2, F2> Function(Res<S, F> re) onRun) =>
    Task._(_task.apply(onRun as Result<S2, F2> Function(Result<S, F>)));