Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"you can match async/wait with generators thus using them for monad computations in Javascript"

I hear the words you are saying, I just cant visualise the concept. Could you ELI5, or post an example?



Yes, check Bodil Stokke's presentation, The Miracle of Generators, at GOTO 2016.

https://www.youtube.com/watch?v=6mCkLZ0cwAI


OK- so basically: async/await, when used with generators and promises, allows monads.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: