flat Map Finished
inline fun <In : Any, Out : Any> Fetch<In>.flatMapFinished(transform: (result: In) -> Fetch<Out>): Fetch<Out>
Transform a finished fetch result.
This is a convenient alias for
fold
, because only the finished can change the type of the Fetch monad. Attempting to map the other branches necessitates that the finished branch is also mapped due to type constraints.
Receiver
The Fetch to transform.
Return
Parameters
In
The type of the Fetch value.
Out
The type of the transformed value.