1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.MaybeMonad = exports.MaybeUnit = void 0;
|
4 | const lang_1 = require("../lang");
|
5 | const monad_1 = require("./monad");
|
6 | exports.MaybeUnit = monad_1.createUnit((monad, value) => {
|
7 | if (!lang_1.isDefined(value)) {
|
8 | monad.bind = _ => monad;
|
9 | }
|
10 | });
|
11 | var MaybeMonad;
|
12 | (function (MaybeMonad) {
|
13 | function fromNullable(value) {
|
14 | return exports.MaybeUnit(value);
|
15 | }
|
16 | MaybeMonad.fromNullable = fromNullable;
|
17 | })(MaybeMonad = exports.MaybeMonad || (exports.MaybeMonad = {}));
|
18 |
|
\ | No newline at end of file |