Functional Programming, JavaScript.
Optional.ofNullable(_value[fn].call(_value)); }; this.getOrElse = function (other) { return _value !== null ? _value : other; }; } return { empty: function () { return Object.freeze(new Option()); }, of: function (val) { if (val === null) { throw 'NoSuchElementError'; } return Object.freeze(new