Examples of Functor, Applicative, and Monad implemented in Ruby