public static function partial($function, $arg)
    {
        $bound = func_get_args();
        array_shift($bound); // remove $function

        $placeholder = static::p();

        return function () use ($function, $bound, $placeholder) {
            $inject = func_get_args();

            $args = [];
            foreach ($bound as $value) {
                if ($value === $placeholder) {
                    $args[] = array_shift($inject);
                } else {
                    $args[] = $value;
                }
            }

            // Append any remaining arguments
            $args = array_merge($args, $inject);

            return call_user_func_array($function, $args);
        };
    }