static satisfy(predicate) {
    if (typeof predicate !== 'function')
      throw new TypeError('predicate must be a function');

    const name = predicate.name
      ? `function ${predicate.name}`
      : 'anonymous function';

    return new this((state, ok, err) => {
      if (!predicate(state.value)) return err(state);
      return ok(state.value, state);
    }).label(`satisfying ${name}`);
  }
/**
   * A function that returns a new validator that succeeds if the given
   * predicate function returns true for the current input, and fails otherwise.
   *
   * @ignore
   * @category static
   * @function satisfy
   * @memberOf Monadidator
   * @static
   * @param {Function} predicate
   * @return {Monadidator}
   */
A function that returns a new validator that succeeds if the given
predicate function returns true for the current input, and fails otherwise.


A function that returns a new validator that succeeds if the given predicate function returns true for the current input and fails otherwise .
static satisfy(predicate) {
    if (typeof predicate !== 'function')
      throw new TypeError('predicate must be a function');
    const name = predicate.name
      ? `function ${predicate.name}`
      : 'anonymous function';
    return new this((state, ok, err) => {
      if (!predicate(state.value)) return err(state);
      return ok(state.value, state);
    }).label(`satisfying ${name}`);
  }
static satisfy ( predicate ) { if ( typeof predicate !== 'function' ) throw new TypeError ( 'predicate must be a function' ) ; const name = predicate . name ? ` ${ predicate . name } ` : 'anonymous function' ; return new this ( ( state , ok , err ) => { if ( ! predicate ( state . value ) ) return err ( state ) ; return ok ( state . value , state ) ; } ) . label ( ` ${ name } ` ) ; }
A function that returns a new validator that succeeds if the given
 predicate function returns true for the current input, and fails otherwise.
A function that returns a new validator that succeeds if the given predicate function returns true for the current input and fails otherwise .