It is similar to a Monad, but not quite, because the "bind" (addCallback) mutates it inplace, and does not return a chained operation. Also because if your callback's return value is itself again a Deferred, it will flatten it out. That means it "auto-joins" on the result so if you want to actually result in some Deferred object in your callback you have to wrap it to circumvent the flattening.
Comments
More interestingly, the original Deferred, from the Twisted networking library, is a monad and an arrow, and it passes the monad laws.
It is similar to a Monad, but not quite, because the "bind" (addCallback) mutates it inplace, and does not return a chained operation. Also because if your callback's return value is itself again a Deferred, it will flatten it out. That means it "auto-joins" on the result so if you want to actually result in some Deferred object in your callback you have to wrap it to circumvent the flattening.