3 ms·
There are various methods and various languages. Scheme uses continuations, javascript can use futures/promises, sometimes you just see a 'yield' operator. Many
by arh68 13y ago
There are various methods and various languages. Scheme uses continuations, javascript can use futures/promises, sometimes you just see a 'yield' operator. Many of these ideas are close to Tony Hoare's 'Communicating Sequential Processes' paper/book [1], so if you want the low down, read the paper.
[1] http://usingcsp.com/cspbook.pdf http://usingcsp.com/cspbook.pdf
- starmole 13y agoThanks for the reply. I was really drunk when posting this, sorry :) I know how things are done in different languages. The thing that stumped "drunk me" was how much harder it would be to explain them. "sober me" realizes that my premise was wrong. I was answering a beginner imperative question. There is no good functional answer. A beginner functional question would be different and have a different answer. In reading my post it is kind of funny to see my own weird tunnel thinking - don't drink and think :).