Implementing coroutines in JavaScript through 'reduce' | Dark Hacker News