Open kwijibo opened 8 years ago
Monad.do doesn't seem to allow for Streams that yield more than once If you change asyncGet in example.js to:
Monad.do
asyncGet
example.js
const asyncGet = n => Cont((rej, res) => setInterval(() => res(n), 100))
(ie, setInterval instead of setTimeout) It bombs out with:
setInterval
setTimeout
./node_modules/freeky/free.js:49 return next(result).foldMap(interpreter, of) ^ TypeError: Cannot read property 'foldMap' of undefined
check this to understand limitations of the do freeky#4
do
Monad.do
doesn't seem to allow for Streams that yield more than once If you changeasyncGet
inexample.js
to:(ie,
setInterval
instead ofsetTimeout
) It bombs out with: