pub fn sorted<T, F>(&self, f: F) -> Self
	where
		T: PartialOrd,
		F: Fn(&Unit) -> T,
	{
		let mut sorted = self.clone();
		sorted.0.sort_by(cmp_by2(f));
		sorted
	}
/// Makes new collection sorted by given function.
/// Leaves original collection untouched.
Makes new collection sorted by given function.
Leaves original collection untouched.
Makes new collection sorted by given function . Leaves original collection untouched .
pub fn sorted<T, F>(&self, f: F) -> Self
	where
		T: PartialOrd,
		F: Fn(&Unit) -> T,
	{
		let mut sorted = self.clone();
		sorted.0.sort_by(cmp_by2(f));
		sorted
	}
pub fn sorted < T , F > ( & self , f : F ) -> Self where T : PartialOrd , F : Fn ( & Unit ) -> T , { let mut sorted = self . clone ( ) ; sorted . 0 . sort_by ( cmp_by2 ( f ) ) ; sorted }
Makes new collection sorted by given function.
Makes new collection sorted by given function .
&self
f
F
&self
f
F