Best Way to Really Understand the Racket Compilation and Execution Model?
lists.racket-lang.org41 pointsby rosh2 comments
class GenAsyncHandler(RequestHandler):
@gen.coroutine
def get(self):
http_client = AsyncHTTPClient()
response = yield http_client.fetch("http://example.com")
do_something_with_response(response)
self.render("template.html")
(via http://www.tornadoweb.org/en/stable/gen.html ..)
Not sure if it will actually help anyone, but it did help me in realising that I had not understood some code, but had instead just glossed over it. The State Monad, for example. [2]
--
[0] https://www.coursera.org/course/reactive
[1] https://github.com/rm/wadler
[2] https://github.com/rm/wadler/blob/master/wadler-2.8.py