pub fn position_max_by_key<I, F, X>(iter: I, f: F) -> Option<usize>
Expand description
Returns the last position of the maximum element of a non empty iterator or None
if iterator
is empty.
use fera_fun::position_max_by_key;
assert_eq!(Some(4), position_max_by_key(&[0i32, 3, -5, 0, 5], |x| x.abs()));