a -> (a, b)

execRWS :: RWS r w s a -> r -> s -> (s, w)
transformers Control.Monad.Trans.RWS.Lazy, transformers Control.Monad.Trans.RWS.Strict, mtl Control.Monad.RWS.Lazy, mtl Control.Monad.RWS.Strict
Evaluate a computation with the given initial state and environment, returning the final state and output, discarding the final value.
elemAt :: Int -> Map k a -> (k, a)
containers Data.Map.Lazy, containers Data.Map.Strict
O(log n). Retrieve an element by its index, i.e. by its zero-based index in the sequence sorted by keys. If the index is out of range (less than zero, greater or equal to size of the map), error is called. > elemAt 0 (fromList [(5,"a"), (3,"b")]) == (3,"b") > elemAt 1 (fromList [(5,"a"), (3,"b")]) == (5, "a") > elemAt 2 (fromList [(5,"a"), (3,"b")]) Error: index out of range
gmapAccumT :: Data d => (forall e. Data e => a -> e -> (a, e)) -> a -> d -> (a, d)
syb Data.Generics.Twins
gmapT with accumulation
buf_span :: BufferOp a -> (Char -> Bool) -> a -> (a, a)
HTTP Network.BufferType
buf_splitAt :: BufferOp a -> Int -> a -> (a, a)
HTTP Network.BufferType
execRWST :: Monad m => RWST r w s m a -> r -> s -> m (s, w)
transformers Control.Monad.Trans.RWS.Lazy, transformers Control.Monad.Trans.RWS.Strict, mtl Control.Monad.RWS.Lazy, mtl Control.Monad.RWS.Strict
Evaluate a computation with the given initial state and environment, returning the final state and output, discarding the final value.
evalRWS :: RWS r w s a -> r -> s -> (a, w)
transformers Control.Monad.Trans.RWS.Lazy, transformers Control.Monad.Trans.RWS.Strict, mtl Control.Monad.RWS.Lazy, mtl Control.Monad.RWS.Strict
Evaluate a computation with the given initial state and environment, returning the final value and output, discarding the final state.
predFM :: Ord a => FiniteMap a b -> a -> Maybe (a, b)
fgl Data.Graph.Inductive.Internal.FiniteMap
succFM :: Ord a => FiniteMap a b -> a -> Maybe (a, b)
fgl Data.Graph.Inductive.Internal.FiniteMap
lookupGE :: Ord k => k -> Map k v -> Maybe (k, v)
containers Data.Map.Lazy, containers Data.Map.Strict
O(log n). Find smallest key greater or equal to the given one and return the corresponding (key, value) pair. > lookupGE 3 (fromList [(3,'a'), (5,'b')]) == Just (3, 'a') > lookupGE 4 (fromList [(3,'a'), (5,'b')]) == Just (5, 'b') > lookupGE 6 (fromList [(3,'a'), (5,'b')]) == Nothing
lookupGT :: Ord k => k -> Map k v -> Maybe (k, v)
containers Data.Map.Lazy, containers Data.Map.Strict
O(log n). Find smallest key greater than the given one and return the corresponding (key, value) pair. > lookupGT 4 (fromList [(3,'a'), (5,'b')]) == Just (5, 'b') > lookupGT 5 (fromList [(3,'a'), (5,'b')]) == Nothing
lookupLE :: Ord k => k -> Map k v -> Maybe (k, v)
containers Data.Map.Lazy, containers Data.Map.Strict
O(log n). Find largest key smaller or equal to the given one and return the corresponding (key, value) pair. > lookupLE 2 (fromList [(3,'a'), (5,'b')]) == Nothing > lookupLE 4 (fromList [(3,'a'), (5,'b')]) == Just (3, 'a') > lookupLE 5 (fromList [(3,'a'), (5,'b')]) == Just (5, 'b')
lookupLT :: Ord k => k -> Map k v -> Maybe (k, v)
containers Data.Map.Lazy, containers Data.Map.Strict
O(log n). Find largest key smaller than the given one and return the corresponding (key, value) pair. > lookupLT 3 (fromList [(3,'a'), (5,'b')]) == Nothing > lookupLT 4 (fromList [(3,'a'), (5,'b')]) == Just (3, 'a')
zip :: Seq a -> Seq b -> Seq (a, b)
containers Data.Sequence
O(min(n1,n2)). zip takes two sequences and returns a sequence of corresponding pairs. If one input is short, excess elements are discarded from the right end of the longer sequence.
zip :: [a] -> [b] -> [(a, b)]
base Prelude, base Data.List
zip takes two lists and returns a list of corresponding pairs. If one input list is short, excess elements of the longer list are discarded.
(>*<) :: Monoidal f => f a -> f b -> f (a, b)
bytestring Data.ByteString.Builder.Prim
A pairing/concatenation operator for builder primitives, both bounded and fixed size. For example, > toLazyByteString (primFixed (char7 >*< char7) ('x','y')) = "xy" We can combine multiple primitives using >*< multiple times. > toLazyByteString (primFixed (char7 >*< char7 >*< char7) ('x',('y','z'))) = "xyz"
listens :: MonadWriter w m => (w -> b) -> m a -> m (a, b)
mtl Control.Monad.Writer.Class, mtl Control.Monad.Writer.Lazy, mtl Control.Monad.Writer.Strict
listens f m is an action that executes the action m and adds the result of applying f to the output to the value of the computation. *  f m = liftM (id *** f) (listen >  
mapAccumL :: (acc -> Word8 -> (acc, Word8)) -> acc -> ByteString -> (acc, ByteString)
bytestring Data.ByteString.Lazy
The mapAccumL function behaves like a combination of map and foldl; it applies a function to each element of a ByteString, passing an accumulating parameter from left to right, and returning a final value of this accumulator together with the new ByteString.
mapAccumL :: (acc -> Word8 -> (acc, Word8)) -> acc -> ByteString -> (acc, ByteString)
bytestring Data.ByteString
The mapAccumL function behaves like a combination of map and foldl; it applies a function to each element of a ByteString, passing an accumulating parameter from left to right, and returning a final value of this accumulator together with the new list.
mapAccumR :: (acc -> Word8 -> (acc, Word8)) -> acc -> ByteString -> (acc, ByteString)
bytestring Data.ByteString, bytestring Data.ByteString.Lazy
The mapAccumR function behaves like a combination of map and foldr; it applies a function to each element of a ByteString, passing an accumulating parameter from right to left, and returning a final value of this accumulator together with the new ByteString.

Show more results