Hoogle Search

Within LTS Haskell 24.46 (ghc-9.10.3)

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

  1. module Data.Discrimination.Internal.WordMap

    This module suppose a Word64-based array-mapped PATRICIA Trie. The most significant nybble is isolated by using techniques based on https://www.fpcomplete.com/user/edwardk/revisiting-matrix-multiplication/part-4 but modified to work nybble-by-nybble rather than bit-by-bit.

  2. data WordMap v

    discrimination Data.Discrimination.Internal.WordMap

    No documentation available.

  3. toIntMap :: [(Int, v)] -> IntMap v

    discrimination Data.Discrimination.Sorting

    O(n). Construct an IntMap.

    >>> toIntMap []
    fromList []
    
    >>> toIntMap [(5,"a"), (3,"b"), (5, "c")]
    fromList [(3,"b"),(5,"c")]
    
    >>> IntMap.fromList [(5,"a"), (3,"b"), (5, "c")]
    fromList [(3,"b"),(5,"c")]
    
    >>> toIntMap [(5,"c"), (3,"b"), (5, "a")]
    fromList [(3,"b"),(5,"a")]
    
    >>> IntMap.fromList [(5,"c"), (3,"b"), (5, "a")]
    fromList [(3,"b"),(5,"a")]
    

  4. toIntMapWith :: (v -> v -> v) -> [(Int, v)] -> IntMap v

    discrimination Data.Discrimination.Sorting

    O(n). Construct an IntMap, combining values. This is an asymptotically faster version of fromListWith, which exploits ordered discrimination. (Note: values combine in anti-stable order for compatibility with fromListWith)

    >>> toIntMapWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"c")]
    fromList [(3,"ab"),(5,"cba")]
    
    >>> IntMap.fromListWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"c")]
    fromList [(3,"ab"),(5,"cba")]
    
    >>> toIntMapWith (++) []
    fromList []
    

  5. toIntMapWithKey :: (Int -> v -> v -> v) -> [(Int, v)] -> IntMap v

    discrimination Data.Discrimination.Sorting

    O(n). Construct a Map, combining values with access to the key. This is an asymptotically faster version of fromListWithKey, which exploits ordered discrimination. (Note: the values combine in anti-stable order for compatibility with fromListWithKey)

    >>> let f key new_value old_value = show key ++ ":" ++ new_value ++ "|" ++ old_value
    
    >>> toIntMapWithKey f [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"c")]
    fromList [(3,"3:a|b"),(5,"5:c|5:b|a")]
    
    >>> IntMap.fromListWithKey f [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"c")]
    fromList [(3,"3:a|b"),(5,"5:c|5:b|a")]
    
    >>> toIntMapWithKey f []
    fromList []
    

  6. toMap :: Sorting k => [(k, v)] -> Map k v

    discrimination Data.Discrimination.Sorting

    O(n). Construct a Map. This is an asymptotically faster version of fromList, which exploits ordered discrimination.

    >>> toMap []
    fromList []
    
    >>> toMap [(5,"a"), (3 :: Int,"b"), (5, "c")]
    fromList [(3,"b"),(5,"c")]
    
    >>> Map.fromList [(5,"a"), (3 :: Int,"b"), (5, "c")]
    fromList [(3,"b"),(5,"c")]
    
    >>> toMap [(5,"c"), (3,"b"), (5 :: Int, "a")]
    fromList [(3,"b"),(5,"a")]
    
    >>> Map.fromList [(5,"c"), (3,"b"), (5 :: Int, "a")]
    fromList [(3,"b"),(5,"a")]
    

  7. toMapWith :: Sorting k => (v -> v -> v) -> [(k, v)] -> Map k v

    discrimination Data.Discrimination.Sorting

    O(n). Construct a Map, combining values. This is an asymptotically faster version of fromListWith, which exploits ordered discrimination. (Note: values combine in anti-stable order for compatibility with fromListWith)

    >>> toMapWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5 :: Int,"c")]
    fromList [(3,"ab"),(5,"cba")]
    
    >>> Map.fromListWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5 :: Int,"c")]
    fromList [(3,"ab"),(5,"cba")]
    
    >>> toMapWith (++) []
    fromList []
    

  8. toMapWithKey :: Sorting k => (k -> v -> v -> v) -> [(k, v)] -> Map k v

    discrimination Data.Discrimination.Sorting

    O(n). Construct a Map, combining values with access to the key. This is an asymptotically faster version of fromListWithKey, which exploits ordered discrimination. (Note: the values combine in anti-stable order for compatibility with fromListWithKey)

    >>> let f key new_value old_value = show key ++ ":" ++ new_value ++ "|" ++ old_value
    
    >>> toMapWithKey f [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5 :: Int,"c")]
    fromList [(3,"3:a|b"),(5,"5:c|5:b|a")]
    
    >>> toMapWithKey f []
    fromList []
    

  9. cmap :: Typeable a => StaticPtr (a -> b) -> Closure a -> Closure b

    distributed-closure Control.Distributed.Closure

    Deprecated: Use staticMap instead.

  10. cmap :: Typeable a => StaticPtr (a -> b) -> Closure a -> Closure b

    distributed-closure Control.Distributed.Closure.Internal

    Deprecated: Use staticMap instead.

Page 1148 of many | Previous | Next