Monad m => m a -> m b -> m a

(>>) :: Monad m => m a -> m b -> m b
base Prelude, base Control.Monad, base Control.Monad.Instances
(<*) :: Applicative f => f a -> f b -> f a
base Control.Applicative
extR :: (Monad m, Typeable a, Typeable b) => m a -> m b -> m a
syb Data.Generics.Aliases
Extend a generic reader
liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r
base Control.Monad
Promote a function to a monad, scanning the monadic arguments from left to right. For example, > liftM2 (+) [0,1] [0,2] = [0,2,1,3] > liftM2 (+) (Just 1) Nothing = Nothing
(*>) :: Applicative f => f a -> f b -> f b
base Control.Applicative
finally :: IO a -> IO b -> IO a
base Control.Exception.Base, base Control.Exception, base Control.OldException
A specialised variant of bracket with just a computation to run afterward.
onException :: IO a -> IO b -> IO a
base Control.Exception.Base, base Control.Exception
Like finally, but only performs the final action if there was an exception raised by the computation.
(\\) :: IntMap a -> IntMap b -> IntMap a
containers Data.IntMap.Strict, containers Data.IntMap.Lazy
Same as difference.
difference :: IntMap a -> IntMap b -> IntMap a
containers Data.IntMap.Strict, containers Data.IntMap.Lazy
O(n+m). Difference between two maps (based on keys). > difference (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 3 "b"
intersection :: IntMap a -> IntMap b -> IntMap a
containers Data.IntMap.Strict, containers Data.IntMap.Lazy
O(n+m). The (left-biased) intersection of two maps (based on keys). > intersection (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "a"
liftM3 :: Monad m => (a1 -> a2 -> a3 -> r) -> m a1 -> m a2 -> m a3 -> m r
base Control.Monad
Promote a function to a monad, scanning the monadic arguments from left to right (cf. liftM2).
ext0 :: (Typeable a, Typeable b) => c a -> c b -> c a
syb Data.Generics.Aliases
Flexible type extension
(<|>) :: Alternative f => f a -> f a -> f a
base Control.Applicative
qRecover :: Quasi m => m a -> m a -> m a
template-haskell Language.Haskell.TH.Syntax
mplus :: MonadPlus m => m a -> m a -> m a
base Control.Monad
differenceWith :: (a -> b -> Maybe a) -> IntMap a -> IntMap b -> IntMap a
containers Data.IntMap.Strict, containers Data.IntMap.Lazy
O(n+m). Difference with a combining function. > let f al ar = if al == "b" then Just (al ++ ":" ++ ar) else Nothing > differenceWith f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (3, "B"), (7, "C")]) > == singleton 3 "b:B"
above :: BlockTable a -> BlockTable a -> BlockTable a
html Text.Html.BlockTable
beside :: BlockTable a -> BlockTable a -> BlockTable a
html Text.Html.BlockTable
catchIO_ :: IO a -> IO a -> IO a
HTTP Network.HTTP.Base
differenceWithKey :: (Key -> a -> b -> Maybe a) -> IntMap a -> IntMap b -> IntMap a
containers Data.IntMap.Strict, containers Data.IntMap.Lazy
O(n+m). Difference with a combining function. When two equal keys are encountered, the combining function is applied to the key and both values. If it returns Nothing, the element is discarded (proper set difference). If it returns (Just y), the element is updated with a new value y. > let f k al ar = if al == "b" then Just ((show k) ++ ":" ++ al ++ "|" ++ ar) else Nothing > differenceWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (3, "B"), (10, "C")]) > == singleton 3 "3:b|B"

Show more results