コード例 #1
0
ファイル: Module.php プロジェクト: bluesnowman/fphp-saber
 /**
  * This method (aka "remove") returns a string containing those characters that do not
  * satisfy the predicate.  Opposite of "filter".
  *
  * @access public
  * @static
  * @param IString\Type $xs                                  the string
  * @param callable $predicate                               the predicate function to be used
  * @return IString\Type                                     a string containing those characters
  *                                                          that do not satisfy the predicate
  */
 public static function reject(IString\Type $xs, callable $predicate) : IString\Type
 {
     return IString\Module::filter($xs, function (Core\Type $x, IInt32\Type $i) use($predicate) {
         return IBool\Module::not($predicate($x, $i));
     });
 }