Hoogle Search

Within LTS Haskell 24.60 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. lookup :: Int -> MonoidalIntMap a -> Maybe a

    monoidal-containers Data.IntMap.Monoidal.Strict

    No documentation available.

  2. lookup :: Ord k => k -> MonoidalMap k a -> Maybe a

    monoidal-containers Data.Map.Monoidal

    No documentation available.

  3. lookup :: Ord k => k -> MonoidalMap k a -> Maybe a

    monoidal-containers Data.Map.Monoidal.Strict

    No documentation available.

  4. lookup :: Ord k => k -> MultiMap k a -> [a]

    multimap Data.MultiMap

    O(log n). Lookup the value at a key in the map. The function will return the corrsponding values as a List, or the empty list if no values are associated witht the given key.

  5. lookup :: Ord k => k -> SetMap k a -> Set a

    multimap Data.SetMap

    O(log n). Lookup the value at a key in the map. The function will return the corrsponding values as a List, or the empty list if no values are associated witht the given key.

  6. lookup :: Key -> NEIntMap a -> Maybe a

    nonempty-containers Data.IntMap.NonEmpty

    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.NonEmpty
    
    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
    

  7. lookup :: Ord k => k -> NEMap k a -> Maybe a

    nonempty-containers Data.Map.NonEmpty

    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.NonEmpty
    
    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
    

  8. lookup :: Int -> NESeq a -> Maybe a

    nonempty-containers Data.Sequence.NonEmpty

    The element at the specified position, counting from 0. If the specified position is negative or at least the length of the sequence, lookup returns Nothing. Unlike index, this can be used to retrieve an element without forcing it.

  9. lookup :: Eq a => a -> [(a, b)] -> Maybe b

    prelude-compat Data.List2010

    No documentation available.

  10. lookup :: Eq a => a -> [(a, b)] -> Maybe b

    prelude-compat Prelude2010

    No documentation available.

Page 11 of many | Previous | Next