Filter, map, and pair-build in single list-comprehension expressions.
Category: Sorting & Data Structures
Sort a list of dicts by a key with sorted() + itemgetter for speed.
Compose map, filter, and reduce to transform a list of numbers.
Sort with Array.prototype.sort and a comparator function.
Sort with usort and a spaceship-operator comparator.
Sort a slice of structs with sort.Slice and a less func.
Chain iterator adaptors and collect into a Vec.
Sort a Vec of structs by one field using sort_by_key.
Sort an array of hashes by a numeric attribute using sort_by.
Sort an array of hashrefs numerically by a single key.