function partialApply(callable $c, ...$args) { return function (...$args2) use ($c, $args) { return $c(...$args, ...$args2); }; }