spanAntitone p xs = (takeWhileAntitone p xs, dropWhileAntitone p xs) spanAntitone p xs = partitionWithKey (\k _ -> p k) xsNote: if p is not actually antitone, then spanAntitone will split the map at some unspecified point.
spanAntitone p xs = (takeWhileAntitone p xs, dropWhileAntitone p xs) spanAntitone p xs = partition p xsNote: if p is not actually antitone, then spanAntitone will split the set at some unspecified point.