Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

State of the art of cheap lists operations in Haskell?

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?

like image 776
LennyStackOverflow Avatar asked Aug 19 '11 08:08

LennyStackOverflow


1 Answers

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.

like image 165
Sjoerd Visscher Avatar answered Sep 18 '22 10:09

Sjoerd Visscher