Hoogle Search

Within LTS Haskell 24.6 (ghc-9.10.2)

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

  1. lookupLT :: Ord k => k -> Map k v -> Maybe (k, v)

    containers Data.Map.Strict.Internal

    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')
    

  2. lookupMax :: Map k a -> Maybe (k, a)

    containers Data.Map.Strict.Internal

    The maximal key of the map. Returns Nothing if the map is empty.

    lookupMax (fromList [(5,"a"), (3,"b")]) == Just (5,"a")
    lookupMax empty = Nothing
    

  3. lookupMin :: Map k a -> Maybe (k, a)

    containers Data.Map.Strict.Internal

    The minimal key of the map. Returns Nothing if the map is empty.

    lookupMin (fromList [(5,"a"), (3,"b")]) == Just (3,"b")
    lookupMin empty = Nothing
    

  4. lookupGE :: Ord a => a -> Set a -> Maybe a

    containers Data.Set

    Find smallest element greater or equal to the given one.

    lookupGE 3 (fromList [3, 5]) == Just 3
    lookupGE 4 (fromList [3, 5]) == Just 5
    lookupGE 6 (fromList [3, 5]) == Nothing
    

  5. lookupGT :: Ord a => a -> Set a -> Maybe a

    containers Data.Set

    Find smallest element greater than the given one.

    lookupGT 4 (fromList [3, 5]) == Just 5
    lookupGT 5 (fromList [3, 5]) == Nothing
    

  6. lookupIndex :: Ord a => a -> Set a -> Maybe Int

    containers Data.Set

    Lookup the index of an element, which is its zero-based index in the sorted sequence of elements. The index is a number from 0 up to, but not including, the size of the set.

    isJust   (lookupIndex 2 (fromList [5,3])) == False
    fromJust (lookupIndex 3 (fromList [5,3])) == 0
    fromJust (lookupIndex 5 (fromList [5,3])) == 1
    isJust   (lookupIndex 6 (fromList [5,3])) == False
    

  7. lookupLE :: Ord a => a -> Set a -> Maybe a

    containers Data.Set

    Find largest element smaller or equal to the given one.

    lookupLE 2 (fromList [3, 5]) == Nothing
    lookupLE 4 (fromList [3, 5]) == Just 3
    lookupLE 5 (fromList [3, 5]) == Just 5
    

  8. lookupLT :: Ord a => a -> Set a -> Maybe a

    containers Data.Set

    Find largest element smaller than the given one.

    lookupLT 3 (fromList [3, 5]) == Nothing
    lookupLT 5 (fromList [3, 5]) == Just 3
    

  9. lookupMax :: Set a -> Maybe a

    containers Data.Set

    The maximal element of a set.

  10. lookupMin :: Set a -> Maybe a

    containers Data.Set

    The minimal element of a set.

Page 36 of many | Previous | Next