static not(validator) {
    if (!(validator instanceof Monadidator))
      throw new TypeError('validator must be an instance of Monadidator');

    return new this((state, ok, err) => {
      const nok = (x, _state) =>
        err({..._state, expected: _state.expected.not()});
      const nerr = (_state) =>
        ok(_state.value, {..._state, expected: _state.expected.not()});

      return validator.unValidate(state, nok, nerr);
    });
  }
/**
   * A function that returns a new validator that succeeds if the given
   * `validator` fails and fails otherwise.
   *
   * @ignore
   * @category static
   * @function not
   * @memberOf Monadidator
   * @static
   * @param {Monadidator} validator
   * @return {Monadidator}
   */
A function that returns a new validator that succeeds if the given
`validator` fails and fails otherwise.


A function that returns a new validator that succeeds if the given ` validator ` fails and fails otherwise .
static not(validator) {
    if (!(validator instanceof Monadidator))
      throw new TypeError('validator must be an instance of Monadidator');
    return new this((state, ok, err) => {
      const nok = (x, _state) =>
        err({..._state, expected: _state.expected.not()});
      const nerr = (_state) =>
        ok(_state.value, {..._state, expected: _state.expected.not()});
      return validator.unValidate(state, nok, nerr);
    });
  }
static not ( validator ) { if ( ! ( validator instanceof Monadidator ) ) throw new TypeError ( 'validator must be an instance of Monadidator' ) ; return new this ( ( state , ok , err ) => { const nok = ( x , _state ) => err ( { ... _state , expected : _state . expected . not ( ) } ) ; const nerr = ( _state ) => ok ( _state . value , { ... _state , expected : _state . expected . not ( ) } ) ; return validator . unValidate ( state , nok , nerr ) ; } ) ; }
A function that returns a new validator that succeeds if the given
 `validator` fails and fails otherwise.
A function that returns a new validator that succeeds if the given ` validator ` fails and fails otherwise .