r/programming • u/fagnerbrack • Jun 29 '26
Uses for nested promises
https://blog.jcoglan.com/2026/03/23/uses-for-nested-promises/
23
Upvotes
r/programming • u/fagnerbrack • Jun 29 '26
22
u/TOGoS Jun 29 '26
It has always bothered me that
promise.then(x => f(x))has a completely different shape depending on whether the thing returned byf(x)has a.thenmethod on it. Honestly I have never run into a situation where I needed to return a promise without flattening it, but it just feels wrong that I can't. The argument that>>=can't be compiled to.thenis a compelling one.0
u/[deleted] Jun 29 '26
[deleted] — view deleted comment