where(property, validator) {
    if (!(validator instanceof Monadidator))
      throw new TypeError('validator must be an instance of Monadidator');

    const where = this.constructor.where(property, validator);
    return this.and(
      new this.constructor((state, ok, err) => {
        const nok = (x, _state) => {
          const __state = {..._state};
          if (__state.map) {
            __state.value = this.constructor[CLONE](__state.value);
            __state.value[property] = x;
          }
          return ok(__state.value, __state);
        };
        return where.unValidate(state, nok, err);
      })
    );
  }
/**
   * A type-restriction method that succeeds if the current input has the
   * sub-property given by `property`, and the given `validator` succeeds when
   * run against the sub-property, and fails otherwise.
   *
   * @category instance
   * @function where
   * @memberOf Monadidator
   * @param {*} property
   * @param {Monadidator} validator
   * @return {Monadidator}
   */
A type-restriction method that succeeds if the current input has the
sub-property given by `property`, and the given `validator` succeeds when
run against the sub-property, and fails otherwise.


A type - restriction method that succeeds if the current input has the sub - property given by ` property ` and the given ` validator ` succeeds when run against the sub - property and fails otherwise .
where(property, validator) {
    if (!(validator instanceof Monadidator))
      throw new TypeError('validator must be an instance of Monadidator');
    const where = this.constructor.where(property, validator);
    return this.and(
      new this.constructor((state, ok, err) => {
        const nok = (x, _state) => {
          const __state = {..._state};
          if (__state.map) {
            __state.value = this.constructor[CLONE](__state.value);
            __state.value[property] = x;
          }
          return ok(__state.value, __state);
        };
        return where.unValidate(state, nok, err);
      })
    );
  }
where ( property , validator ) { if ( ! ( validator instanceof Monadidator ) ) throw new TypeError ( 'validator must be an instance of Monadidator' ) ; const where = this . constructor . where ( property , validator ) ; return this . and ( new this . constructor ( ( state , ok , err ) => { const nok = ( x , _state ) => { const __state = { ... _state } ; if ( __state . map ) { __state . value = this . constructor [ CLONE ] ( __state . value ) ; __state . value [ property ] = x ; } return ok ( __state . value , __state ) ; } ; return where . unValidate ( state , nok , err ) ; } ) ) ; }
A type-restriction method that succeeds if the current input has the
 sub-property given by `property`, and the given `validator` succeeds when
 run against the sub-property, and fails otherwise.
A type - restriction method that succeeds if the current input has the sub - property given by ` property ` and the given ` validator ` succeeds when run against the sub - property and fails otherwise .