úΫ      1(c) 2006-2009 Don Stewart, 2013-2016 Sean LeatherSee LICENSE filesean.leather@gmail.comstableportableNone$DRb†A difference list is a function that, given a list, returns the original contents of the difference list prepended to the given list.This structure supports O(1)m append and snoc operations on lists, making it very useful for append-heavy uses (esp. left-nested uses of  (), such as logging and pretty printing.]Here is an example using DList as the state type when printing a tree with the Writer monad: ÿimport Control.Monad.Writer import Data.DList data Tree a = Leaf a | Branch (Tree a) (Tree a) flatten_writer :: Tree x -> DList x flatten_writer = snd . runWriter . flatten where flatten (Leaf x) = tell (singleton x) flatten (Branch x y) = flatten x >> flatten y!'A unidirectional pattern synonym using $ in a view pattern and matching on x:xs such that you have the pattern  Cons x xs"'A unidirectional pattern synonym using $ in a view pattern and matching on []Convert a list to a dlistConvert a dlist to a listDApply a dlist to a list to get the underlying list with an extension !apply (fromList xs) ys = xs ++ ys%Create a dlist containing no elements"Create dlist with a single elementO(1)%. Prepend a single element to a dlistO(1)$. Append a single element to a dlistO(1). Append dlists O(spine). Concatenate dlists O(n)0. Create a dlist of the given number of elements O(n). List elimination for dlists O(n). Return the head of the dlist O(n). Return the tail of the dlistO(n). Unfoldr for dlistsO(n). Foldr over difference listsO(n). Map over difference lists.$#$!" "!  "#$!"   %      !"#$%&'()$dlist-0.8.0.2-GWAMmbX9rLg3tqrbOizHGv Data.DListDListfromListtoListapplyempty singletonconssnocappendconcat replicatelistheadtailunfoldrfoldrmap$fSemigroupDList $fIsListDList$fIsStringDList $fNFDataDList$fFoldableDList$fMonadPlusDList $fMonadDList$fAlternativeDList$fApplicativeDList$fFunctorDList $fMonoidDList $fShowDList $fReadDList $fOrdDList $fEqDListbaseGHC.Base++ConsNilDLunDL