#![allow(unused_variables)] use extend::ext; use std::iter::FromIterator; #[ext] impl C where C: IntoIterator, K: Eq, F: Fn(&T) -> K, { fn group_by(self, f: F) -> Out where Out: FromIterator<(K, Vec)>, { todo!() } fn group_by_and_map_values(self, f: F, g: G) -> Out where G: Fn(T) -> T2 + Copy, Out: FromIterator<(K, Vec)>, { todo!() } fn group_by_and_return_groups(self, f: F) -> Vec> { todo!() } } fn main() {}