Is coffeescript's `?.` operator a monad?
coffeescript, haskell, monads
Solution
A single operator cannot be a monad in the same way an engine cannot be a motor vehicle. Short-circuiting behavior is a property of Maybe and `(Maybe, return, (>>=))` happens to be a monad.
There probably exists some set of things that you can define within CoffeeScript such that together they happen to be a monad as well with `?.` filling the "bind" role. Unlike Haskell those things are unlikely to all be first-class or even representable within the language.
Problem
I just read about the Maybe Monad in Haskell and it seems to fill a similar role to Coffeescript's `?.` operator. Is the `?.` operator considered a monad or is it just two different ways of doing the same thing? In Haskell, you write ``` a >>= b >>= c ``` In coffeescript, you write ``` a?.b?.c ```