I needed a generic Trie implementation in Haskell but I could not find any.
I was implemented my own functions (only keys here, I didn't need data on Trie) but I want to find a good Trie implementation in Haskell for future uses (I'm a rookie haskeller).
I was found Data.Trie but keys are ByteString.
Is Data.Trie the correct option? (and then I don't know how to use it)
Thank you!!! :D
Data.IntMap
andData.IntSet
are tries withInt
keys. – BuretteData.IntMap
treats anInt
as a sequence of bits. Being able to sort or index directly on each chunk is nice, but a list of things you can compare for equality is enough. Anyway, there's a packagelist-tries
out there but it always struck me as a bit confusing. – BuretteMemoTrie
package, but for the specific purpose of memoization. – Fyn