pub fn replace_root<A, F: Fn(&A, &A) -> bool>(
xs: &mut [A],
) -> A
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
xs being empty is an error.