public static bool Any <TSource>(this IEnumerable <TSource> source)
        {
            switch (source)
            {
            case TSource[] array:
                return(array.Length != 0);

            case IReadOnlyCollection <TSource> collection:
                return(collection.Count != 0);

            default:
                return(AnyDowncasted <IEnumerable <TSource>, TSource> .Any(source));
            }
        }
 public static bool Any <TSource>(this IEnumerable <TSource> source, Func <TSource, bool> predicate)
 => AnyDowncasted <IEnumerable <TSource>, TSource> .Any(source, predicate);