a -> (a -> Bool) -> Maybe 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.
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.
suchThatMaybe :: Gen a -> (a -> Bool) -> Gen (Maybe a)
QuickCheck Test.QuickCheck.Gen, QuickCheck Test.QuickCheck
Tries to generate a value that satisfies a predicate.
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
until :: (a -> Bool) -> (a -> a) -> a -> a
base Prelude
until p f yields the result of applying f until p holds.
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.
findIndexL :: (a -> Bool) -> Seq a -> Maybe Int
containers Data.Sequence
findIndexL p xs finds the index of the leftmost element that satisfies p, if any exist.
findIndexR :: (a -> Bool) -> Seq a -> Maybe Int
containers Data.Sequence
findIndexR p xs finds the index of the rightmost element that satisfies p, if any exist.
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
($) :: (a -> b) -> a -> b
base Prelude, base Data.Function
Application operator. This operator is redundant, since ordinary application (f x) means the same as (f $ x). However, $ has low, right-associative binding precedence, so it sometimes allows parentheses to be omitted; for example: > f $ g $ h x = f (g (h x)) It is also useful in higher-order situations, such as map ($ 0) xs, or Data.List.zipWith ($) fs xs.
($!) :: (a -> b) -> a -> b
base Prelude
Strict (call-by-value) application, defined in terms of seq.
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.
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.
maybe :: b -> (a -> b) -> Maybe a -> b
base Prelude, base Data.Maybe
The maybe function takes a default value, a function, and a Maybe value. If the Maybe value is Nothing, the function returns the default value. Otherwise, it applies the function to the value inside the Just and returns the result.
extT :: (Typeable a, Typeable b) => (a -> a) -> (b -> b) -> a -> a
syb Data.Generics.Aliases
Extend a generic transformation by a type-specific case
fmap :: Functor f => (a -> b) -> f a -> f b
base Prelude, base Data.Functor, base Control.Monad, base Control.Monad.Instances
(<$>) :: Functor f => (a -> b) -> f a -> f b
base Data.Functor, base Control.Applicative
An infix synonym for fmap.

Show more results