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

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.
mkQ :: (Typeable a, Typeable b) => r -> (b -> r) -> a -> r
syb Data.Generics.Aliases
Make a generic query; start from a type-specific case; return a constant otherwise
iterateN :: Int -> (a -> a) -> a -> Seq a
containers Data.Sequence
O(n). Constructs a sequence by repeated application of a function to a seed value. > iterateN n f x = fromList (Prelude.take n (Prelude.iterate f x))
gmapQi :: Data a => Int -> (forall d. Data d => d -> u) -> a -> u
base Data.Data
gmapQr :: Data a => (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r
base Data.Data
gmapQl :: Data a => (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r
base Data.Data
on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
base Data.Function
(*) `on` f = \x y -> f x * f y. Typical usage: Data.List.sortBy (compare `on` fst). Algebraic properties: * (*) `on` id = (*) (if (*) {, const }) * (*) `on` f) `on` g = (*) `on` (f . *  on f . flip on g = flip on (g . >  
adjust :: (a -> a) -> Int -> Seq a -> Seq a
containers Data.Sequence
O(log(min(i,n-i))). Update the element at the specified position. If the position is out of range, the original sequence is returned.
comparing :: Ord a => (b -> a) -> b -> b -> Ordering
base Data.Ord
> comparing p x y = compare (p x) (p y) Useful combinator for use in conjunction with the xxxBy family of functions from Data.List, for example: > ... sortBy (comparing fst) ...
adjust :: (a -> a) -> Key -> IntMap a -> IntMap a
containers Data.IntMap.Strict, containers Data.IntMap.Lazy
O(min(n,W)). Adjust a value at a specific key. When the key is not a member of the map, the original map is returned. > adjust ("new " ++) 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "new a")] > adjust ("new " ++) 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")] > adjust ("new " ++) 7 empty == empty
throwErrnoPathIf :: (a -> Bool) -> String -> RawFilePath -> IO a -> IO a
unix System.Posix.ByteString.FilePath
as throwErrnoIf, but exceptions include the given path when appropriate.
throwErrnoPathIfRetry :: (a -> Bool) -> String -> RawFilePath -> IO a -> IO a
unix System.Posix.ByteString.FilePath