Function bicoro::map [−][src]
pub fn map<'a, I: 'a, O: 'a, A: 'a, B: 'a, F: 'a>(
co: Coroutine<'a, I, O, A>,
map: F
) -> Coroutine<'a, I, O, B> where
F: FnOnce(A) -> B,
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());