Functor, Applicative Functor and Monad laws implemented in JavaScript