Simple implementation of monads in Ruby