Just posted this at Elm Discuss, but thought I would post it here as well as I think this would be interesting code to look at for core developers. I've tried to make the code as easily readable as possible, and I've spent some fair amount of time at explaining the algorithm in the readme :)
Just pushed CollectionsNg to package.elm-lang.org.
CollectionsNg contain implementations of Array, Dict and Set written in pure Elm. The implementations are API compatible with their namesakes in elm-core, all you have to do to use them is to use different namespaces.
These collections differ from those in elm-core with a stable Array implementation, and that equality (==) works as you would expect.
|