[a] -> (a -> Bool) -> a

find :: (a -> Bool) -> [a] -> Maybe a
base Data.List
The find function takes a predicate and a list and returns the first element in the list matching the predicate, or Nothing if there is no such element.
dropWhile :: (a -> Bool) -> [a] -> [a]
base Prelude, base Data.List
dropWhile p xs returns the suffix remaining after takeWhile p xs: > dropWhile (< 3) [1,2,3,4,5,1,2,3] == [3,4,5,1,2,3] > dropWhile (< 9) [1,2,3] == [] > dropWhile (< 0) [1,2,3] == [1,2,3]
filter :: (a -> Bool) -> [a] -> [a]
base Prelude, base Data.List
filter, applied to a predicate and a list, returns the list of those elements that satisfy the predicate; i.e., > filter p xs = [ x | x <- xs, p x]
takeWhile :: (a -> Bool) -> [a] -> [a]
base Prelude, base Data.List
takeWhile, applied to a predicate p and a list xs, returns the longest prefix (possibly empty) of xs of elements that satisfy p: > takeWhile (< 3) [1,2,3,4,1,2,3,4] == [1,2] > takeWhile (< 9) [1,2,3] == [1,2,3] > takeWhile (< 0) [1,2,3] == []
all :: (a -> Bool) -> [a] -> Bool
base Prelude, base Data.List
Applied to a predicate and a list, all determines if all elements of the list satisfy the predicate. For the result to be True, the list must be finite; False, however, results from a False value for the predicate applied to an element at a finite index of a finite or infinite list.
any :: (a -> Bool) -> [a] -> Bool
base Prelude, base Data.List
Applied to a predicate and a list, any determines if any element of the list satisfies the predicate. For the result to be False, the list must be finite; True, however, results from a True value for the predicate applied to an element at a finite index of a finite or infinite list.
mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a
base Control.Monad
Direct MonadPlus equivalent of filter filter = (mfilter:: (a -> Bool) -> [a] -> [a] applicable to any MonadPlus, for example mfilter odd (Just 1) == Just 1 mfilter odd (Just 2) == Nothing
find :: Foldable t => (a -> Bool) -> t a -> Maybe a
base Data.Foldable
The find function takes a predicate and a structure and returns the leftmost element of the structure matching the predicate, or Nothing if there is no such element.
until :: (a -> Bool) -> (a -> a) -> a -> a
base Prelude
until p f yields the result of applying f until p holds.
all :: Foldable t => (a -> Bool) -> t a -> Bool
base Data.Foldable
Determines whether all elements of the structure satisfy the predicate.
any :: Foldable t => (a -> Bool) -> t a -> Bool
base Data.Foldable
Determines whether any element of the structure satisfies the predicate.
everywhere :: (forall a. Data a => a -> a) -> (forall a. Data a => a -> a)
syb Data.Generics.Schemes
Apply a transformation everywhere in bottom-up manner
everywhere' :: (forall a. Data a => a -> a) -> (forall a. Data a => a -> a)
syb Data.Generics.Schemes
Apply a transformation everywhere in top-down manner
escapeString :: String -> (Char -> Bool) -> String
network Network.URI
Deprecated: use escapeURIString, and note the flipped arguments
findIndex :: (a -> Bool) -> [a] -> Maybe Int
base Data.List
The findIndex function takes a predicate and a list and returns the index of the first element in the list satisfying the predicate, or Nothing if there is no such element.
findIndices :: (a -> Bool) -> [a] -> [Int]
base Data.List
The findIndices function extends findIndex, by returning the indices of all elements satisfying the predicate, in ascending order.
escapeURIString :: (Char -> Bool) -> String -> String
network Network.URI
Can be used to make a string valid for use in a URI.
sortWith :: Ord b => (a -> b) -> [a] -> [a]
base GHC.Exts
The sortWith function sorts a list of elements using the user supplied function to project something out of each element
map :: (a -> b) -> [a] -> [b]
base Prelude, base Data.List
map f xs is the list obtained by applying f to each element of xs, i.e., > map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn] > map f [x1, x2, ...] == [f x1, f x2, ...]
throwErrnoIf :: (a -> Bool) -> String -> IO a -> IO a
base Foreign.C.Error
Throw an IOError corresponding to the current value of getErrno if the result value of the IO action meets the given predicate.

Show more results