:: (a -> a -> Bool) -> [a] -> [a] -> [a] package:utility-ht

Given two lists that are ordered (i.e. p x y holds for subsequent x and y) mergeBy them into a list that is ordered, again.
>>> mergeBy (<=) "agh" "begz"
"abegghz"