#![allow(unused)]fnmain() {
/// An adaptation of `Iterator::find` to a free-functionpubasyncfnfind<I, T, P>(iter: &mut I, predicate: P) -> Option<T>
where
I: asyncIterator<Item = T> + Sized,
P: FnMut(&T) -> bool;
}
This is just a postfix version of the originally proposed syntax.
This should appear more familiar, as the question mark is normally used at the end of a
sentence, not at the beginning, and it looks similar to typescripts nullable types.
it also makes generic references more legible &mut? T vs &?mut T.