(a -> b) -> Maybe a -> Maybe b
An infix synonym for fmap.
Lift a function to actions. This function may be used as a value for fmap in a Functor instance.
This function may be used as a value for fmap in a Functor instance.
Promote a function to a monad.
In many situations, the liftM operations can be replaced by uses of ap, which promotes function application.
> return f `ap` x1 `ap` ... `ap` xn
is equivalent to
> liftMn f x1 x2 ... xn
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.
A variant of <*> with the arguments reversed.
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.
Strict (call-by-value) application, defined in terms of seq.
This function may be used as a value for Data.Foldable.foldMap in a Foldable instance.
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.
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
Sequential function application. The argument is evaluated using the given strategy before it is given to the function.
Parallel function application. The argument is evaluated using the given strategy, in parallel with the function application.
the deep analogue of $!. In the expression f $!! x, x is fully evaluated before the function f is applied to it.
Apply a transformation everywhere in bottom-up manner
Apply a transformation everywhere in top-down manner
Show more results