-
-
Save vadimcn/d83f548b6134b76d80d0f6f33ea439a6 to your computer and use it in GitHub Desktop.
Futures
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impl<A,Y,R,F> Coroutine<A> for F where F: FnMut(A) -> CoResult<Y,R> { | |
type Yield = Y; | |
type Return = R; | |
fn call(&mut self, a: A) -> CoResult<Self::Yield, Self::Return> { | |
self(a) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment