purescript-catenable-lists
purescript-catenable-lists copied to clipboard
Catenable lists
For now I've updated the tests and whatnot to use the RCs, but once everything is properly released and we start updating dependants we can put the benchmarks back in...
The code for `CatQueue` cites Okasaki, 1995: https://github.com/purescript/purescript-catenable-lists/blob/da5091b9fcafe46284655336c66ee758e8e0e22c/src/Data/CatQueue.purs#L8 This is a bit puzzling, as the actual implementation is not the lazy-list based one proposed in that paper, but rather the...
The `Semigroup` instance and `append` in https://github.com/purescript/purescript-catenable-lists/pull/30 are implemented as `foldl snoc` that appends successive elements from the `CatQueue` on the right. In most cases, that's probably what you'd want....
There seems to be nothing particularly "`Cat`ty" about `CatQueue`. Perhaps, with the additional PRs I've made, it could live in its own lib, and get pulled in here?
The `traverse` implementation of CatQueue iterates through every element twice. Is this intended? https://github.com/purescript/purescript-catenable-lists/blob/09abe1f4888bc00841ad2b59e56a9e7ce7ebd4ab/src/Data/CatQueue.purs#L166-L168