a -> (a -> b) -> b

($) :: (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.
($|) :: (a -> b) -> Strategy a -> a -> b
parallel Control.Parallel.Strategies
Sequential function application. The argument is evaluated using the given strategy before it is given to the function.
($||) :: (a -> b) -> Strategy a -> a -> b
parallel Control.Parallel.Strategies
Parallel function application. The argument is evaluated using the given strategy, in parallel with the function application.
($!!) :: NFData a => (a -> b) -> a -> b
deepseq Control.DeepSeq
the deep analogue of $!. In the expression f $!! x, x is fully evaluated before the function f is applied to it.
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
extQ :: (Typeable a, Typeable b) => (a -> q) -> (b -> q) -> a -> q
syb Data.Generics.Aliases
Extend a generic query by a type-specific case
ext1Q :: (Data d, Typeable1 t) => (d -> q) -> (forall e. Data e => t e -> q) -> d -> q
syb Data.Generics.Aliases
Type extension of queries for type constructors
ext2Q :: (Data d, Typeable2 t) => (d -> q) -> (forall d1 d2. (Data d1, Data d2) => t d1 d2 -> q) -> d -> q
syb Data.Generics.Aliases
Type extension of queries for type constructors
until :: (a -> Bool) -> (a -> a) -> a -> a
base Prelude
until p f yields the result of applying f until p holds.
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.
gmapQi :: Data a => Int -> (forall d. Data d => d -> u) -> a -> u
base Data.Data
(.) :: (b -> c) -> (a -> b) -> a -> c
base Prelude, base Data.Function
Function composition.
iterate :: (a -> a) -> a -> [a]
base Prelude, base Data.List
iterate f x returns an infinite list of repeated applications of f to x: > iterate f x == [x, f x, f (f x), ...]
map :: (a -> b) -> IntMap a -> IntMap b
containers Data.IntMap.Strict, containers Data.IntMap.Lazy
O(n). Map a function over all values in the map. > map (++ "x") (fromList [(5,"a"), (3,"b")]) == fromList [(3, "bx"), (5, "ax")]
mapMonotonic :: (a -> b) -> Set a -> Set b
containers Data.Set
O(n). The mapMonotonic f s == map f s, but works only when f is monotonic. The precondition is not checked. Semi-formally, we have: > and [x < y ==> f x < f y | x <- ls, y <- ls] > ==> mapMonotonic f s == map f s >  
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, ...]
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