How to interpret bind/>>= of the function instance?
问题 I'm trying to improve my understanding of Applicative s and Monad s by implementing their function instances in Javascript. My knowledge of Haskell is limited and I hope that my question makes sense at all. Here are my implementations of fmap , <*> and >>= for the Functor , Applicative and Monad typeclasses in Javascript: const fmap = f => g => x => f(g(x)); // B combinator const apply = f => g => x => f(x) (g(x)); // S combinator const bind = f => g => x => g(f(x)) (x); // ? I am not sure