diff --git a/containers/docs/map.rst b/containers/docs/map.rst index fca75f193..1d9d88fa6 100644 --- a/containers/docs/map.rst +++ b/containers/docs/map.rst @@ -250,8 +250,8 @@ value) pairs in the map ``m`` in *descending* key order. Querying ^^^^^^^^ -Lookup an entry in the map (lookup) -""""""""""""""""""""""""""""""""""" +Look up an entry in the map (lookup) +"""""""""""""""""""""""""""""""""""" :: diff --git a/containers/docs/sequence.rst b/containers/docs/sequence.rst index 41ccf8147..c732c36b3 100644 --- a/containers/docs/sequence.rst +++ b/containers/docs/sequence.rst @@ -48,7 +48,7 @@ The following GHCi session shows some of the basic sequence functionality:: > 3 - -- Lookup an element at a certain index (since version 0.4.8). + -- Look up an element at a certain index (since version 0.4.8). Seq.lookup 2 nums > Just 3 diff --git a/containers/src/Data/IntMap/Internal.hs b/containers/src/Data/IntMap/Internal.hs index f2c62e9bc..40f4d0b95 100644 --- a/containers/src/Data/IntMap/Internal.hs +++ b/containers/src/Data/IntMap/Internal.hs @@ -594,7 +594,7 @@ member !k = go notMember :: Key -> IntMap a -> Bool notMember k m = not $ member k m --- | \(O(\min(n,W))\). Lookup the value at a key in the map. See also 'Data.Map.lookup'. +-- | \(O(\min(n,W))\). Look up the value at a key in the map. See also 'Data.Map.lookup'. -- See Note: Local 'go' functions and capturing lookup :: Key -> IntMap a -> Maybe a @@ -985,8 +985,8 @@ updateWithKey f k t@(Tip ky y) | otherwise = t updateWithKey _ _ Nil = Nil --- | \(O(\min(n,W))\). Lookup and update. --- The function returns original value, if it is updated. +-- | \(O(\min(n,W))\). Look up and update. +-- This function returns the original value, if it is updated. -- This is different behavior than 'Data.Map.updateLookupWithKey'. -- Returns the original key value if the map entry is deleted. -- diff --git a/containers/src/Data/IntMap/Strict/Internal.hs b/containers/src/Data/IntMap/Strict/Internal.hs index 3076a9a3e..ad3a8ec19 100644 --- a/containers/src/Data/IntMap/Strict/Internal.hs +++ b/containers/src/Data/IntMap/Strict/Internal.hs @@ -534,7 +534,7 @@ updateWithKey f !k t = | otherwise -> t Nil -> Nil --- | \(O(\min(n,W))\). Lookup and update. +-- | \(O(\min(n,W))\). Look up and update. -- The function returns original value, if it is updated. -- This is different behavior than 'Data.Map.updateLookupWithKey'. -- Returns the original key value if the map entry is deleted. diff --git a/containers/src/Data/Map/Internal.hs b/containers/src/Data/Map/Internal.hs index b72948317..4a9e7006c 100644 --- a/containers/src/Data/Map/Internal.hs +++ b/containers/src/Data/Map/Internal.hs @@ -545,7 +545,7 @@ size (Bin sz _ _ _ _) = sz {-# INLINE size #-} --- | \(O(\log n)\). Lookup the value at a key in the map. +-- | \(O(\log n)\). Look up 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. @@ -1115,8 +1115,8 @@ updateWithKey = go {-# INLINE updateWithKey #-} #endif --- | \(O(\log n)\). Lookup and update. See also 'updateWithKey'. --- The function returns changed value, if it is updated. +-- | \(O(\log n)\). Look up and update. See also 'updateWithKey'. +-- This function returns the changed value, if it is updated. -- Returns the original key value if the map entry is deleted. -- -- > let f k x = if x == "a" then Just ((show k) ++ ":new a") else Nothing @@ -1470,7 +1470,7 @@ findIndex = go 0 {-# INLINABLE findIndex #-} #endif --- | \(O(\log n)\). Lookup the /index/ of a key, which is its zero-based index in +-- | \(O(\log n)\). Look up 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. -- diff --git a/containers/src/Data/Map/Strict/Internal.hs b/containers/src/Data/Map/Strict/Internal.hs index 9f731b38d..3f1336c8c 100644 --- a/containers/src/Data/Map/Strict/Internal.hs +++ b/containers/src/Data/Map/Strict/Internal.hs @@ -739,8 +739,8 @@ updateWithKey = go {-# INLINE updateWithKey #-} #endif --- | \(O(\log n)\). Lookup and update. See also 'updateWithKey'. --- The function returns changed value, if it is updated. +-- | \(O(\log n)\). Look up and update. See also 'updateWithKey'. +-- This function returns the changed value, if it is updated. -- Returns the original key value if the map entry is deleted. -- -- > let f k x = if x == "a" then Just ((show k) ++ ":new a") else Nothing diff --git a/containers/src/Data/Set/Internal.hs b/containers/src/Data/Set/Internal.hs index 82c41496c..475f1fe0f 100644 --- a/containers/src/Data/Set/Internal.hs +++ b/containers/src/Data/Set/Internal.hs @@ -1477,7 +1477,7 @@ findIndex = go 0 {-# INLINABLE findIndex #-} #endif --- | \(O(\log n)\). Lookup the /index/ of an element, which is its zero-based index in +-- | \(O(\log n)\). Look up 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. --