containers
containers copied to clipboard
Assorted concrete container types
I see `containers.h` being `#include`d in almost every module, which is probably the point, but is this just a specific choice: "include it everywhere, if we ever need it it'll...
`fromDistinctAscList [a,b..c]` takes time proportional to the number of elements. We should be able to write a specialized function that does better when `b-a` is less than 58 or so,...
cross reference to https://github.com/haskell-unordered-containers/hashable/issues/269
Following up on https://github.com/haskell/containers/issues/949#issuecomment-1574528332 This PR is based off #962, so marking as draft. This PR improves * `Set.fromAscList`, `Set.fromDescList` * `Map.fromAscList`, `Map.fromDescList`, `Map.fromAscListWith`, `Map.fromDescListWith`, `Map.fromAscListWithKey`, `Map.fromDescListWithKey` by making the...
Should address https://github.com/haskell/containers/pull/953#discussion_r1257348718
Why does #830 change the documented complexity of Set/Map operations from $O\bigl(m \log \bigl(\frac{n}{m} + 1 \bigr)\bigr)$ to $O\bigl(m \log\bigl(\frac{n+1}{m+1}\bigr)\bigr)$?
just making a note that such a function (with N = length of second argument) could be useful, since an implementation can use N to determine the shape of the...
We have in `Data.Tree` ```hs foldTree :: (a -> [b] -> b) -> Tree a -> b ``` Unfortunately `foldTree` does not optimize as well it could when `b` is...
Set difference and union sometimes have to be computed together, such as in semi-naive fixed point computation: ```haskell seminaive :: Ord a => Set a -> (Set a -> Set...
Bodigrim's comment about improved allocations https://github.com/haskell/containers/pull/909#issuecomment-1414503913 and #928 makes me wonder if it would be good to represent graphs as `Array Int (UArray Int Int)` or something similar, instead of...