compact-sequences-0.1.0.0: Stacks and queues with compact representations.

Data.CompactSequence.Stack.Internal

# Documentation

data Stack n a Source #

Constructors

 Empty One !(Array n a) !(Stack (Twice n) a) Two !(Array n a) !(Array n a) (Stack (Twice n) a) Three !(Array n a) !(Array n a) !(Array n a) !(Stack (Twice n) a)
Instances
 Functor (Stack n) Source # Instance detailsDefined in Data.CompactSequence.Stack.Internal Methodsfmap :: (a -> b) -> Stack n a -> Stack n b #(<\$) :: a -> Stack n b -> Stack n a # Source # Instance detailsDefined in Data.CompactSequence.Stack.Internal Methodsfold :: Monoid m => Stack n m -> m #foldMap :: Monoid m => (a -> m) -> Stack n a -> m #foldr :: (a -> b -> b) -> b -> Stack n a -> b #foldr' :: (a -> b -> b) -> b -> Stack n a -> b #foldl :: (b -> a -> b) -> b -> Stack n a -> b #foldl' :: (b -> a -> b) -> b -> Stack n a -> b #foldr1 :: (a -> a -> a) -> Stack n a -> a #foldl1 :: (a -> a -> a) -> Stack n a -> a #toList :: Stack n a -> [a] #null :: Stack n a -> Bool #length :: Stack n a -> Int #elem :: Eq a => a -> Stack n a -> Bool #maximum :: Ord a => Stack n a -> a #minimum :: Ord a => Stack n a -> a #sum :: Num a => Stack n a -> a #product :: Num a => Stack n a -> a # Source # Instance detailsDefined in Data.CompactSequence.Stack.Internal Methodstraverse :: Applicative f => (a -> f b) -> Stack n a -> f (Stack n b) #sequenceA :: Applicative f => Stack n (f a) -> f (Stack n a) #mapM :: Monad m => (a -> m b) -> Stack n a -> m (Stack n b) #sequence :: Monad m => Stack n (m a) -> m (Stack n a) # Eq a => Eq (Stack n a) Source # Instance detailsDefined in Data.CompactSequence.Stack.Internal Methods(==) :: Stack n a -> Stack n a -> Bool #(/=) :: Stack n a -> Stack n a -> Bool # Ord a => Ord (Stack n a) Source # Instance detailsDefined in Data.CompactSequence.Stack.Internal Methodscompare :: Stack n a -> Stack n a -> Ordering #(<) :: Stack n a -> Stack n a -> Bool #(<=) :: Stack n a -> Stack n a -> Bool #(>) :: Stack n a -> Stack n a -> Bool #(>=) :: Stack n a -> Stack n a -> Bool #max :: Stack n a -> Stack n a -> Stack n a #min :: Stack n a -> Stack n a -> Stack n a # Show a => Show (Stack n a) Source # Instance detailsDefined in Data.CompactSequence.Stack.Internal MethodsshowsPrec :: Int -> Stack n a -> ShowS #show :: Stack n a -> String #showList :: [Stack n a] -> ShowS #

consA :: Size n -> Array n a -> Stack n a -> Stack n a Source #

data ViewA n a Source #

Constructors

 EmptyA ConsA !(Array n a) (Stack n a)

unconsA :: Size n -> Stack n a -> ViewA n a Source #