immutable icon indicating copy to clipboard operation
immutable copied to clipboard

sorted map

Open rdp opened this issue 5 years ago • 1 comments

Might be nice. Though I don't, heh, like "need it today" as it were. Either sorted by insertion or by a key. And possibly some other structures that clojure has as well would be nice: https://clojure.org/reference/data_structures#Vectors thanks for the library!

rdp avatar Oct 15 '18 16:10 rdp

Hi! Sorry for the late response. Yes, I agree more data structures would be useful. Immutable List would be quite easy to add, although I suspect Vector would be preferable in most situations. Set can be implemented on top of Map. Sorted maps by insertion order like Clojure's ArrayMap are also quite simple, and can be implemented on top of Vector, but their performance is linear, so they are only ideal for small collections. Sorted maps sorted by key could be implemented as trees, with logarithmic lookup/insertion complexity.

lucaong avatar Nov 28 '18 08:11 lucaong