haskell-unordered-containers / unordered-containers

Efficient hashing-based container types
BSD 3-Clause "New" or "Revised" License
222 stars 97 forks source link

fix typos #472

Closed ghost closed 2 years ago

ghost commented 2 years ago

Data/HashMap/Internal.hs Data/HashMap/Internal/Array.hs Data/HashMap/Internal/List.hs Data/HashMap/Internal/Strict.hs docs/developer-guide.md tests/Strictness.hs

unattended to

$ grep -nr documentaton unordered-containers
unordered-containers/CHANGES.md:193: * Add internal documentaton. (Thanks, Johan Tibell)
$

a recursive grep for Homogenous and Homogeonous might also be run on the repo

sjakobi commented 2 years ago

Thank you, @fluesvamp! :)

ghost commented 2 years ago

the two similarly spelled words

Data/HashMap/Internal/List.hs

-- The idea:
--
-- Homogeonous version
--
-- uc :: (a -> a -> Ordering) -> [a] -> [a] -> Ordering
-- uc c as bs = compare (sortBy c as) (sortBy c bs)
--
-- But as we have only (a -> b -> Ordering), we cannot directly compare
-- elements from the same list.
--
-- So when comparing elements from the list, we count how many elements are
-- "less and greater" in the other list, and use the count as a metric.
--

tests/Properties/List.hs

-- | Homogenous version of 'unorderedCompare'
--
-- *Compare smallest non-equal elements of the two lists*.
sjakobi commented 2 years ago

the two similarly spelled words

Fixed in https://github.com/haskell-unordered-containers/unordered-containers/pull/473. Thanks!