| Copyright | (c) 2014 by Nate Pisarski |
|---|---|
| License | BSD3 |
| Maintainer | nathanpisarski@gmail.com |
| Stability | Stable |
| Portability | Portable (Standalone - ghc) |
| Safe Haskell | Safe |
| Language | Haskell98 |
Cookbook.Ingredients.Functional.Break
Description
Library for breaking conditionally on lists. When one filters a list, it will filter all of the elements. When one filterBREAKS a list, it will stop collecting the list at a desired element. This library also includes functions for conditionally transforming a list.
- removeBreak :: (a -> Bool) -> [a] -> [a]
- filterBreak :: (a -> Bool) -> [a] -> [a]
- imbreak :: (a -> Bool) -> [a] -> Bool
- btr :: (a -> Bool) -> (b, b) -> [a] -> [b]
Documentation
removeBreak :: (a -> Bool) -> [a] -> [a] Source #
Drop a list until a predicate yields false, returning the false item and the rest of the list.
filterBreak :: (a -> Bool) -> [a] -> [a] Source #
Collect a list until a predicate yields false for a value.