func min(xs []float64) float64 { return functional.Fold(math.Min, xs) }
func max(xs []float64) float64 { return functional.Fold(math.Max, xs) }