Functional Programming, JavaScript.
Optional monad, also called the Maybe monad in some functional programming languages. Here is the code for the Optional JavaScript object (some details omitted for brevity): var Optional = (function () { // private constructor function Option(val) { var _value = val || null; // public methods