úÎ³Û      experimental#Bas van Dijk <v.dijk.bas@gmail.com>LA difference string is a function that given a string, returns the original B contents of the difference string prepended at the given string. This structure supports O(1) mappend en snoc operations on strings making L it very usefull for append-heavy uses such as logging and pretty printing. NYou can use it to efficiently show a tree for example: (Note that we use some  handy functions from the string-combinators package) $ {-# LANGUAGE OverloadedStrings #-}  * import Data.DString (toShowS, fromShowS) < import Data.String.Combinators ((<+>), parens, thenParens)  1 data Tree a = Leaf a | Branch (Tree a) (Tree a)  ( instance Show a => Show (Tree a) where I showsPrec prec t = toShowS $ (prec >= funAppPrec) `thenParens` go t  where K go (Leaf x) = "Leaf" <+> fromShowS (showsPrec funAppPrec x) J go (Branch l r) = "Branch" <+> parens (go l) <+> parens (go r)   funAppPrec = 10 5O(n) Convert a difference string to a normal string. "O(1) Convert a difference list of Chars to a difference string. 7O(1) Convert a difference string to a difference list. O(1) Convert a ShowS to a difference string. &O(1) Convert a difference string to a ShowS. -O(1) Build a difference string from a single Char. O(1)), Prepend a Char to a difference string. O(1) , Append a Char to a difference string. O(spine)", Concatenate difference strings.  O(length ds)+, difference list elimination, head, tail. *Return the head of the difference string. *Return the tail of the difference string.  Unfoldr for difference strings. Foldr over difference strings.         dstring-0.4.0.3 Data.DStringDStringtoString fromDListtoDList fromShowStoShowS singletonconssnocconcatlistheadtailunfoldrfoldrDS