
28 Aug
2008
28 Aug
'08
4:30 a.m.
Jules Bean
Jason Dusek wrote:
I would much rather have a pure Trie that is foldable. If we have a Trie, we get a space efficient sorted list, too.
Well, Data.Sequence can be used as a space efficient sorted list which is Foldable - if you make the decision to insert elements into it in a sorted way, obviously.
What advantages would a Trie have over Data.Sequence?
A trie is guaranteed sorted -- so using a trie amounts to a "type level" guarantee for binary search and any other algorithm that relies on sortedness. -- _jsn