Skip to content

UMR1352/extrema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Utility for finding the minimum and maximum elements of an iterable collection in a single pass without copy. Similar to C++'s minmax_element, Julia's extrema and Ruby's minmax.

Usage

Just call it on a collection!

let xs = vec![0, 1, 2, 3];
let minmax = xs.extrema();

assert_eq!(minmax, Some((0, 3)));

About

minmax method for iterable collections

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages