Reputation: 2238
For cheap operations like append
on lists (not character strings), I would use Data.DList.
What holds me back is that the package on Hackage is marked “experimental” and the last update was in 2009.
Is DList still the way to go for that in Haskell?
Upvotes: 7
Views: 412
Reputation: 4486
Data.DList seems to have been last updated at Sat Jun 20 23:01:49 UTC 2009. Pretty many useful things in hackage are marked experimental, but I wouldn't worry about that. DList seems quite solid. It uses none of the volatile language extensions and the code is actually quite simple.
So, I guess, the answer would be: yes, DList is still good.
Upvotes: 6
Reputation: 12010
Use Seq from Data.Sequence. It also has O(1) cons and snoc, but it is in base, and is used and tested a lot more.
Upvotes: 13