3 ms·
I was recently thinking while working with ES6 Promises that I liked to have something equivalent to Haskells `do` notation. Or Scalas `for` comprehension. Doe
by joostdevries 10y ago
I was recently thinking while working with ES6 Promises that I liked to have something equivalent to Haskells `do` notation. Or Scalas `for` comprehension.
Does something like that exist?
If not maybe I should try Kleislis instead. But I'd like my code to be accessible for my colleagues. And it's my rule of thumb that I try not to use point free constructions (like Kleislis) because a lot of colleagues will no longer understand my code easily.
- joostdevries 10y agoOn second thought: I guess Async Await are like a `do` notation specifically for Promises...
- homami 10y agoThat's true. await sequence actions much like do notation.
- joostdevries 10y ago..and it's flat instead of nesting.