pub fn split_args(&self, optional: Option<&Ident>) -> (&[TypedArg<'a>], &[TypedArg<'a>]) {
        let mut mid = None;
        for (i, arg) in self.typed.iter().enumerate() {
            if let Some(optional) = optional {
                if optional == arg.name {
                    mid.replace(i);
                }
            } else if mid.is_none() && arg.nullable {
                mid.replace(i);
            } else if !arg.nullable {
                mid.take();
            }
        }
        match mid {
            Some(mid) => (&self.typed[..mid], &self.typed[mid..]),
            None => (&self.typed[..], &self.typed[0..0]),
        }
    }
Splits the typed arguments into two slices:

1. Required arguments.
2. Non-required arguments.

# Parameters

* `optional` - The first optional argument. If [`None`], the optional
arguments will be from the first nullable argument after the last
non-nullable argument to the end of the arguments.
crates/macros/src/function.rs