Last active
August 29, 2015 14:16
-
-
Save vinipsmaker/467db84a09c49c410f30 to your computer and use it in GitHub Desktop.
Code from http://isocpp.org/files/papers/n4045.pdf
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
string // task<string> | |
read(string file, string suffix, // read(string file, string suffix) | |
yield_context yield) { // __async { | |
istream fi = open(file, yield); // istream fi = __await open(file); | |
string ret, chunk; | |
while((chunk = fi.read(yield)).size()) // while((chunk = __await fi.read()).size()) | |
ret += chunk + suffix; | |
return ret; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment