modifs.mineures sans commentaires

This commit is contained in:
Jephté Clain 2024-06-20 19:05:13 +04:00
parent ad603e8e81
commit de6d4d69e7
1 changed files with 17 additions and 0 deletions

View File

@ -191,4 +191,21 @@ class A {
return $values;
}
static final function filter_if(&$dest, callable $cond): void {
self::ensure_narray($dest);
$dest = cl::filter_if($dest, $cond);
}
static final function filter_z(?array $dest): void { self::filter_if($dest, [cv::class, "z"]);}
static final function filter_nz(?array $dest): void { self::filter_if($dest, [cv::class, "nz"]);}
static final function filter_n(?array $dest): void { self::filter_if($dest, [cv::class, "n"]);}
static final function filter_nn(?array $dest): void { self::filter_if($dest, [cv::class, "nn"]);}
static final function filter_t(?array $dest): void { self::filter_if($dest, [cv::class, "t"]);}
static final function filter_f(?array $dest): void { self::filter_if($dest, [cv::class, "f"]);}
static final function filter_pt(?array $dest): void { self::filter_if($dest, [cv::class, "pt"]);}
static final function filter_pf(?array $dest): void { self::filter_if($dest, [cv::class, "pf"]);}
static final function filter_equals(?array $dest, $value): void { self::filter_if($dest, cv::equals($value)); }
static final function filter_not_equals(?array $dest, $value): void { self::filter_if($dest, cv::not_equals($value)); }
static final function filter_same(?array $dest, $value): void { self::filter_if($dest, cv::same($value)); }
static final function filter_not_same(?array $dest, $value): void { self::filter_if($dest, cv::not_same($value)); }
}