takeWhile package:ghc

Take while a predicate on the keys holds. The user is responsible for ensuring that for all Ints, j < k ==> p j >= p k. See note at spanAntitone.
takeWhileAntitone p = fromDistinctAscList . takeWhile (p . fst) . toList
takeWhileAntitone p = filterWithKey (\k _ -> p k)
Take while a predicate on the elements holds. The user is responsible for ensuring that for all Ints, j < k ==> p j >= p k. See note at spanAntitone.
takeWhileAntitone p = fromDistinctAscList . takeWhile p . toList
takeWhileAntitone p = filter p