merge

fun List<Double>.merge(f: (Double, Double) -> Boolean): List<Double>