On Mon, May 27, 2013 at 7:29 AM, Russell Leggett
<[email protected]> wrote:
> I'm just going to go ahead and play stupid here. Why is it called chain? I
> agree one more method doesn't break anyone's brain, but I think the
> confusion comes when it is not clear what a method is for and when they
> should use it. Can anyone just try to write a really quick API doc for chain
> so that someone without knowledge of monads could read it? It should
> hopefully be fairly obvious after reading the doc why the method is called
> chain.

Yeah, it's pretty easy - the chain() method lets you "chain" one
promise into another - you start with a promise, take a function that
returns a promise, and return a promise from that.

(Naming abstract operations is hard, but I think chain() is better
than bind().  This is probably why Haskell spells it ">>=". ^_^)

~TJ
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to