a b c -> b -> c

runReader :: Reader r a -> r -> a
transformers Control.Monad.Trans.Reader, mtl Control.Monad.Reader
Runs a Reader and extracts the final value from it. (The inverse of reader.)
evalState :: State s a -> s -> a
transformers Control.Monad.Trans.State.Lazy, transformers Control.Monad.Trans.State.Strict, mtl Control.Monad.State.Lazy, mtl Control.Monad.State.Strict
Evaluate a state computation with the given initial state and return the final value, discarding the final state. *  m s = fst (runState m >  
apply :: Fun a b -> (a -> b)
QuickCheck Test.QuickCheck.Function
(!) :: Ord k => Map k a -> k -> a
containers Data.Map.Lazy, containers Data.Map.Strict
O(log n). Find the value at a key. Calls error when the element can not be found. > fromList [(5,'a'), (3,'b')] ! 1 Error: element not in the map > fromList [(5,'a'), (3,'b')] ! 5 == 'a'
runReaderT :: ReaderT r a -> r -> m a
mtl Control.Monad.Reader
The underlying computation, as a function of the environment.
(!) :: Ix i => Array i e -> i -> e
array Data.Array
The value at the given index in an array.
(!) :: (IArray a e, Ix i) => a i e -> i -> e
array Data.Array.IArray
Returns the element of an immutable array at the specified index.
findWithDefault :: Ord k => a -> k -> Map k a -> a
containers Data.Map.Lazy, containers Data.Map.Strict
O(log n). The expression (findWithDefault def k map) returns the value at key k or returns default value def when the key is not in the map. > findWithDefault 'x' 1 (fromList [(5,'a'), (3,'b')]) == 'x' > findWithDefault 'x' 5 (fromList [(5,'a'), (3,'b')]) == 'a'
lookupFM :: Ord a => FiniteMap a b -> a -> Maybe b
fgl Data.Graph.Inductive.Internal.FiniteMap
lookup :: Ord k => k -> Map k a -> Maybe a
containers Data.Map.Lazy, containers Data.Map.Strict
O(log n). Lookup the value at a key in the map. The function will return the corresponding value as (Just value), or Nothing if the key isn't in the map. An example of using lookup: > import Prelude hiding (lookup) > import Data.Map > > employeeDept = fromList([("John","Sales"), ("Bob","IT")]) > deptCountry = fromList([("IT","USA"), ("Sales","France")]) > countryCurrency = fromList([("USA", "Dollar"), ("France", "Euro")]) > > employeeCurrency :: String -> Maybe String > employeeCurrency name = do > dept <- lookup name employeeDept > country <- lookup dept deptCountry > lookup country countryCurrency > > main = do > putStrLn $ "John's currency: " ++ (show (employeeCurrency "John")) > putStrLn $ "Pete's currency: " ++ (show (employeeCurrency "Pete")) The output of this program: > John's currency: Just "Euro" > Pete's currency: Nothing
execState :: State s a -> s -> s
transformers Control.Monad.Trans.State.Lazy, transformers Control.Monad.Trans.State.Strict, mtl Control.Monad.State.Lazy, mtl Control.Monad.State.Strict
Evaluate a state computation with the given initial state and return the final state, discarding the final value. *  m s = snd (runState m >  
elemFM :: Ord a => FiniteMap a b -> a -> Bool
fgl Data.Graph.Inductive.Internal.FiniteMap
delete :: HashTable key val -> key -> IO ()
base Data.HashTable
Remove an entry from the hash table.
deg :: Graph gr => gr a b -> Node -> Int
fgl Data.Graph.Inductive.Graph
The degree of the Node.
indeg :: Graph gr => gr a b -> Node -> Int
fgl Data.Graph.Inductive.Graph
The inward-bound degree of the Node.
outdeg :: Graph gr => gr a b -> Node -> Int
fgl Data.Graph.Inductive.Graph
The outward-bound degree of the Node.
findIndex :: Ord k => k -> Map k a -> Int
containers Data.Map.Lazy, containers Data.Map.Strict
O(log n). Return the index of a key, which is its zero-based index in the sequence sorted by keys. The index is a number from 0 up to, but not including, the size of the map. Calls error when the key is not a member of the map. > findIndex 2 (fromList [(5,"a"), (3,"b")]) Error: element is not in the map > findIndex 3 (fromList [(5,"a"), (3,"b")]) == 0 > findIndex 5 (fromList [(5,"a"), (3,"b")]) == 1 > findIndex 6 (fromList [(5,"a"), (3,"b")]) Error: element is not in the map
member :: Ord k => k -> Map k a -> Bool
containers Data.Map.Lazy, containers Data.Map.Strict
O(log n). Is the key a member of the map? See also notMember. > member 5 (fromList [(5,'a'), (3,'b')]) == True > member 1 (fromList [(5,'a'), (3,'b')]) == False
notMember :: Ord k => k -> Map k a -> Bool
containers Data.Map.Lazy, containers Data.Map.Strict
O(log n). Is the key not a member of the map? See also member. > notMember 5 (fromList [(5,'a'), (3,'b')]) == False > notMember 1 (fromList [(5,'a'), (3,'b')]) == True
readArray :: (MArray a e m, Ix i) => a i e -> i -> m e
array Data.Array.MArray, array Data.Array.MArray.Safe
Read an element from a mutable array

Show more results