A monad is mysterious entity from the ivory towers of category theory, an
idea that turned out to be quite useful in programming. Part of the myth
surrounding monads is that as soon as you understand them, you lose the ability
to explain the concept. Since I’m not a mathematician, not even a trained
programmer, I won’t even try to explain anything. Instead, I just implement a
simple monad.
R, being a functional programming language should be able to benefit from this
concept. The goal is not to create a library, just to demonstrate monads, and
gain a practical understanding of its usefulness.