Maximum call stack size for Async monad
See original GitHub issueDescribe the bug Async Monad will raise error call stack size
To Reproduce
import {Async, traverse, map} from 'crocks';
import {range} from 'ramda';
const wrap = a => Async((rej, res) => res(a))
traverse(Async.of, wrap, range(0, 4000)).fork(console.error, console.log)
Expected behavior I think we can trampoline so we don’t get this error.
Additional context maybe there is another way for traverse that I’m not aware of.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
RangeError: Maximum call stack size exceeded (getting this ...
RangeError: Maximum call stack size exceeded. On using multiple async/await i am getting error RangeError: Maximum call stack size exceeded.
Read more >Maximum call stack size exceeded in async | by Erin Zhang
So the solution to the issue is one of the followings: process.nextTick(function() { callback(); }); setTimeout(callback, 0);; async.ensureAsync ...
Read more >How to avoid stack overflow with monads? - Help
RangeError: Maximum call stack size exceeded. What are some general strategies to avoid stack overflow when using monads for large numbers ...
Read more >Async parser to fix "Maximum call stack size exceeded" #749
When parsing a huge file (~300 custom blocks), its failing with RangeError: Maximum call stack size exceeded . The easiest solution will be ......
Read more >crocksjs/crocks - Gitter
hey hi, I am using ReaderT(Async) and getting maximum stack call size, is there any workaround? ... is it this place that I...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@evilsoft - In case you’re not looking into this already, I’d be very eager to pick this one up.
Nice work, just seen this, thanks for sharing!