Created
October 14, 2016 22:31
-
-
Save gabrielcorado/9ffb7aad990803f0a9038ab706c1155f to your computer and use it in GitHub Desktop.
Nice example of Coroutines
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
Say you're in the kitchen in front of the refrigerator, thinking about a sandwich. You take a continuation right there and stick it in your pocket. Then you get some turkey and bread out of the refrigerator and make yourself a sandwich, which is now sitting on the counter. You invoke the continuation in your pocket, and you find yourself standing in front of the refrigerator again, thinking about a sandwich. But fortunately, there's a sandwich on the counter, and all the materials used to make it are gone. So you eat it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment