sequence-0.9.8: A type class for sequences and various sequence data structures.

Copyright(c) Atze van der Ploeg 2014
LicenseBSD-style
Maintaineratzeus@gmail.org
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Data.Sequence.FastQueue

Description

A sequence, a queue, with worst case constant time: |>, and tviewl.

Based on: "Simple and Efficient Purely Functional Queues and Deques", Chris Okasaki, Journal of Functional Programming 1995

Documentation

data FastQueue a #

Instances

Functor FastQueue # 

Methods

fmap :: (a -> b) -> FastQueue a -> FastQueue b #

(<$) :: a -> FastQueue b -> FastQueue a #

Foldable FastQueue # 

Methods

fold :: Monoid m => FastQueue m -> m #

foldMap :: Monoid m => (a -> m) -> FastQueue a -> m #

foldr :: (a -> b -> b) -> b -> FastQueue a -> b #

foldr' :: (a -> b -> b) -> b -> FastQueue a -> b #

foldl :: (b -> a -> b) -> b -> FastQueue a -> b #

foldl' :: (b -> a -> b) -> b -> FastQueue a -> b #

foldr1 :: (a -> a -> a) -> FastQueue a -> a #

foldl1 :: (a -> a -> a) -> FastQueue a -> a #

toList :: FastQueue a -> [a] #

null :: FastQueue a -> Bool #

length :: FastQueue a -> Int #

elem :: Eq a => a -> FastQueue a -> Bool #

maximum :: Ord a => FastQueue a -> a #

minimum :: Ord a => FastQueue a -> a #

sum :: Num a => FastQueue a -> a #

product :: Num a => FastQueue a -> a #

Traversable FastQueue # 

Methods

traverse :: Applicative f => (a -> f b) -> FastQueue a -> f (FastQueue b) #

sequenceA :: Applicative f => FastQueue (f a) -> f (FastQueue a) #

mapM :: Monad m => (a -> m b) -> FastQueue a -> m (FastQueue b) #

sequence :: Monad m => FastQueue (m a) -> m (FastQueue a) #

Sequence FastQueue #