fold
inline fun <Data : Any, Output> FetchFlow<Data>.fold(crossinline prefetch: suspend Prefetch.() -> Output, crossinline fetching: suspend Fetching<Data>.() -> Output, crossinline finished: suspend Finished<Data>.() -> Output): Flow<Output>
Fold a FetchFlow into a Flow of Output.
Fold can be used to map
or flatMap
all Fetch variants, but it also can output any type.
Receiver
The FetchFlow to fold.
Return
A Flow of the folded value, as type Output.