@puffnfresh As I said: on that abstraction level I agree. But practical example where specifically auto-flatMap of promises fails..?
-
-
Replying to @puffnfresh
@puffnfresh I was talking about specifically flatMap of promise chains. When using .then - not a theoretical .map1 reply 0 retweets 0 likes -
Replying to @jankrems
@puffnfresh So my question would be: could there be any function that expects Promise[Promise[T]] for good reasons?2 replies 0 retweets 0 likes -
Replying to @jankrems
@jankrems@puffnfresh without abstraction, even the slightest, there is no longer any point to the API. It's entirely rubbish.1 reply 0 retweets 0 likes -
Replying to @dibblego
@dibblego@puffnfresh Well, imho an abstraction for its own sake without practical value is rubbish. PLs are tools in the end.2 replies 0 retweets 0 likes -
Replying to @jankrems
@jankrems@dibblego@puffnfresh Jan, what if you wanted to crawl sites async, and aggregate all the results to a single record after async?1 reply 0 retweets 0 likes -
Replying to @jackcviers
@jackviers@dibblego@puffnfresh `Q.all loadAll(urlArray), aggregate` - don't see a problem.1 reply 0 retweets 0 likes -
Replying to @jankrems
@jankrems@dibblego@puffnfresh Not a problem, you asked for an example where it would be useful urlarr.map(request).flatMap(aggregate);2 replies 0 retweets 0 likes -
Replying to @jackcviers
@jackviers@dibblego@puffnfresh The question is: would I ever want a `Promise[Promise[ValueType]]`? Don't think your example covers that.3 replies 0 retweets 0 likes
@jankrems @jackviers @puffnfresh the reason monads are monoids is because of the primitive (F (F a) -> F a). That is, flatten=flatMap.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.