On Thu, Apr 25, 2013 at 6:03 PM, Dean Tribble <trib...@e-dean.com> wrote: > So what's an example > that motivates you to want to build a tower of promise types? The main one > I know of is the implementation (not use of) higher-order collection > constructs that use promises internally (e.g., the implementation of map and > reduce for an async, batching, flow-controlled stream of Promise<T>). That > kind of rare example can have more advanced hooks (like Q).
I think it's more important to see examples of why you want to *flatten* them automatically. Having "towers of promises" keeps us consistent with Futures-as-monads, which is useful from a theoreticaly standpoint. This is similar, from an algebraic standpoint, to allowing arrays of arrays, or sets of sets, or any other monadic context doubled up. ~TJ _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss