pub fn any<'t, I>(patterns: I) -> Result<Self, BuildError>
    where
        I: IntoIterator,
        I::Item: Pattern<'t>,
    {
        let (exhaustive, nonexhaustive) = patterns
            .into_iter()
            .map(TryInto::try_into)
            .collect::<Result<Vec<_>, _>>()
            .map_err(Into::into)?
            .into_iter()
            .partition::<Vec<_>, _>(|tree| token::is_exhaustive(tree.as_ref().tokens()));
        Ok(FilterAny {
            program: FilterAnyProgram::from_partitions(exhaustive, nonexhaustive)?,
        })
    }
Combines patterns into a `FilterAny`.

This function accepts an [`IntoIterator`] with items that implement
[`Pattern`], such as [`Glob`] and `&str`.

# Errors

Returns an error if any of the inputs fail to build. If the inputs are a
compiled [`Program`] type such as [`Glob`], then this only occurs if
the compiled program is too large.

[`Glob`]: crate::Glob
[`IntoIterator`]: std::iter::IntoIterator
[`Pattern`]: crate::Pattern
[`Program`]: crate::Program
crates/turborepo-wax/src/walk/glob.rs