pub fn map<'a, I, O, A, B, F>(
co: Coroutine<'a, I, O, A>,
map: F
) -> Coroutine<'a, I, O, B>where
F: FnOnce(A) -> B + 'a,
Expand description
Map the inner type of the coroutine
This is sugar of bind and result
use bicoro::*;
let co :Coroutine<i32,(),String> = map(receive(), |a| a.to_string());