text: // Generated by BUCKLESCRIPT VERSION 3.1.5, PLEASE EDIT WITH CARE
  'use strict';
  
  var Curry = require("bs-platform/lib/js/curry.js");
  
  function identity(x) {
    return x;
  }
  
  function from(x) {
    if (x) {
      return /* Just */[x[0]];
    } else {
      return /* Nothing */0;
    }
  }
  
  function map(fn, x) {
    if (x) {
      return /* Just */[Curry._1(fn, x[0])];
    } else {
      return /* Nothing */0;
    }
  }
  
  function reduce(fn, x) {
    if (x) {
      return /* Some */[Curry._1(fn, x[0])];
    } else {
      return /* None */0;
    }
  }
  
  function chain(fn, x) {
    if (x) {
      var value = reduce(identity, Curry._1(fn, x[0]));
      if (value) {
        return /* Just */[value[0]];
      } else {
        return /* Nothing */0;
      }
    } else {
      return /* Nothing */0;
    }
  }
  
  function value($$default, x) {
    if (x) {
      return x[0];
    } else {
      return $$default;
    }
  }
  
  function ap(fn, x) {
    if (x && fn) {
      return /* Just */[Curry._1(fn[0], x[0])];
    } else {
      return /* Nothing */0;
    }
  }
  
  function branch(left, right, x) {
    if (x) {
      return /* Just */[Curry._1(right, x[0])];
    } else {
      return /* Just */[Curry._1(left, /* () */0)];
    }
  }
  
  function $less$pipe(x, y) {
    return Curry._1(x, y);
  }
  
  function $great$great(x, y, z) {
    return Curry._1(y, Curry._1(x, z));
  }
  
  function $less$less(x, y, z) {
    return Curry._1(x, Curry._1(y, z));
  }
  
  function $pipe$pipe$great(x, y) {
    return map(y, x);
  }
  
  function $pipe$pipe$pipe$great(x, y) {
    return chain(y, x);
  }
  
  function $great$pipe(x, y) {
    return value(y, x);
  }
  
  function $great$pipe$pipe(x, y) {
    return reduce(y, x);
  }
  
  var $less$neg$great = branch;
  
  function create(x) {
    return /* record */[
            /* map */(function (fn) {
                if (x) {
                  var mapped = map(fn, /* Just */[x[0]]);
                  if (mapped) {
                    return create(/* Some */[mapped[0]]);
                  } else {
                    return create(/* None */0);
                  }
                } else {
                  return create(/* None */0);
                }
              }),
            /* value */(function (v) {
                if (x) {
                  return value(v, /* Just */[x[0]]);
                } else {
                  return v;
                }
              }),
            /* reduce */(function (fn) {
                if (x) {
                  return reduce(fn, /* Just */[x[0]]);
                } else {
                  return /* None */0;
                }
              })
          ];
  }
  
  exports.identity = identity;
  exports.from = from;
  exports.map = map;
  exports.reduce = reduce;
  exports.chain = chain;
  exports.value = value;
  exports.ap = ap;
  exports.branch = branch;
  exports.$less$pipe = $less$pipe;
  exports.$great$great = $great$great;
  exports.$less$less = $less$less;
  exports.$pipe$pipe$great = $pipe$pipe$great;
  exports.$pipe$pipe$pipe$great = $pipe$pipe$pipe$great;
  exports.$great$pipe = $great$pipe;
  exports.$great$pipe$pipe = $great$pipe$pipe;
  exports.$less$neg$great = $less$neg$great;
  exports.create = create;
  /* No side effect */
  