Here is a preliminary solution to the "collate" problem (page 91 of The
Book), using a single stack and 0 (zero, no) threads.
Although I've only tested it lightly, I believe that it conforms to FBP
semantics (aka Classic FBP) using bounded queues.
The only restriction is that a Looper must contain a Send or a Receive
(or a yet-to-be-implemented Yield).
https://github.com/guitarvydas/collate-fbp-classic
This technique should be easier in any language less-stunted than C
(esp. any language that treats functions as first-class objects).
I see no reason why this cannot be implemented in js.
My fundamental concern is with "efficiency". This, I believe,
demonstrates that FBP can be implemented very efficiently.
I'll describe it in more detail on my blog, when I have time. In the
meantime, questions are most welcome.
pt