public static function last($array, $n = 1, $guard = false)
    {
        $array = static::toArray($array);
        $result = array_values(array_slice($array, -$n));
        return $guard || isset($result[1]) ? $result : $result[0];
    }