X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Data%2FSequence.hs;h=318dc200dead3797603c37051cb3b2320d842fa6;hb=176a386c7803f560e70a5d0467c58f29b9664d75;hp=402dcfe3ccb95b4d9fc0df7f774be8b513f9f561;hpb=e953c1ea5f8d6d6c56d5e829eb434caf9059fd71;p=haskell-directory.git diff --git a/Data/Sequence.hs b/Data/Sequence.hs index 402dcfe..318dc20 100644 --- a/Data/Sequence.hs +++ b/Data/Sequence.hs @@ -41,6 +41,9 @@ module Data.Sequence ( (><), -- :: Seq a -> Seq a -> Seq a fromList, -- :: [a] -> Seq a -- * Deconstruction + -- | Additional functions for deconstructing sequences are available + -- via the 'Foldable' instance of 'Seq'. + -- ** Queries null, -- :: Seq a -> Bool length, -- :: Seq a -> Int @@ -1008,6 +1011,8 @@ splitDigit i (Four a b c d) ------------------------------------------------------------------------ -- | /O(n)/. Create a sequence from a finite list of elements. +-- There is a function 'toList' in the opposite direction for all +-- instances of the 'Foldable' class, including 'Seq'. fromList :: [a] -> Seq a fromList = Data.List.foldl' (|>) empty