public static function first($array, $n = 1, $guard = false)
    {
        if (empty($array))
            return;

        if ($n <= 0)
            throw new \UnexpectedValueException("invalid number of items $n");

        $result = [];
        static::each($array, function ($item) use (& $n, & $result) {
            $result[] = $item;

            if (--$n == 0)
                return static::BREAKER;
        });

        return $guard || isset($result[1]) ? $result : $result[0];
    }