public static function before($count, $function)
    {
        $memo = null;

        return function () use ($function, &$count, &$memo) {
            if (--$count > 0) {
                $args = func_get_args();
                $memo = call_user_func_array($function, $args);
            }

            return $memo;
        };
    }