pub fn replace_root<A, F: Fn(&A, &A) -> bool>(
arity: usize,
f: F,
xs: &mut [A],
x: A,
) -> AExpand description
Given a slice xs which is already a heap, replace the root.
f(x,y) is whether x must be nearer to the root than y.
xs being empty is an error.