3 ms·
In case you need a trampoline, it's more comfortable to use a well grown data type. Here's mine ... Eval, a data-type for handling synchronous evaluation: http
by bad_user 9y ago
In case you need a trampoline, it's more comfortable to use a well grown data type. Here's mine ...
Eval, a data-type for handling synchronous evaluation: https://funfix.org/api/effect/classes/eval.html https://funfix.org/api/effect/classes/eval.html
IO, a data-type for suspending side effects, including asynchronous ones, an FP/lawful replacement for Promise; ported from Haskell, but better: https://funfix.org/api/effect/classes/io.html https://funfix.org/api/effect/classes/io.html
Also note that Promise's implementation leaks memory in "then" chains, so be cautious when using Promises to work around JavaScript's call-stack — https://alexn.org/blog/2017/10/11/javascript-promise-leaks-memory.html https://alexn.org/blog/2017/10/11/javascript-promise-leaks-m...
- chrisseaton 9y ago> use a well grown data type What does 'well grown' mean in the context of data types?
- bad_user 9y agoLawful.
- chrisseaton 9y agoI've heard of lawful but never 'well grown' - where does the term come from?