Skip to main content

flat_map_with

Function flat_map_with 

Source
pub fn flat_map_with<'a, T: Clone + 'a, U: 'a, V: 'a>(
    l: impl Iterator<Item = U> + 'a,
    x: T,
    r: impl Fn(U, T) -> BoxIter<'a, V> + 'a,
) -> BoxIter<'a, V>
Expand description

For every element y returned by l, return the outputs of r(y, x).

In case that l returns only a single element, this does not clone x.