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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With