purebred-0.1.0.0: An mail user agent built around notmuch

Safe HaskellNone
LanguageHaskell2010

Purebred.LazyVector

Description

Lazy vectors.

Synopsis

Documentation

data V a Source #

A lazy vector. Linked list of chunks.

Instances
Functor V Source # 
Instance details

Defined in Purebred.LazyVector

Methods

fmap :: (a -> b) -> V a -> V b

(<$) :: a -> V b -> V a

Foldable V Source # 
Instance details

Defined in Purebred.LazyVector

Methods

fold :: Monoid m => V m -> m

foldMap :: Monoid m => (a -> m) -> V a -> m

foldr :: (a -> b -> b) -> b -> V a -> b

foldr' :: (a -> b -> b) -> b -> V a -> b

foldl :: (b -> a -> b) -> b -> V a -> b

foldl' :: (b -> a -> b) -> b -> V a -> b

foldr1 :: (a -> a -> a) -> V a -> a

foldl1 :: (a -> a -> a) -> V a -> a

toList :: V a -> [a]

null :: V a -> Bool

length :: V a -> Int

elem :: Eq a => a -> V a -> Bool

maximum :: Ord a => V a -> a

minimum :: Ord a => V a -> a

sum :: Num a => V a -> a

product :: Num a => V a -> a

Traversable V Source # 
Instance details

Defined in Purebred.LazyVector

Methods

traverse :: Applicative f => (a -> f b) -> V a -> f (V b)

sequenceA :: Applicative f => V (f a) -> f (V a)

mapM :: Monad m => (a -> m b) -> V a -> m (V b)

sequence :: Monad m => V (m a) -> m (V a)

Splittable V Source # 
Instance details

Defined in Purebred.LazyVector

Methods

splitAt :: Int -> V a -> (V a, V a)

slice :: Int -> Int -> V a -> V a

Eq a => Eq (V a) Source #

Θ(n) Concatenates chunks and checks equality.

Instance details

Defined in Purebred.LazyVector

Methods

(==) :: V a -> V a -> Bool

(/=) :: V a -> V a -> Bool

Ord a => Ord (V a) Source #

Θ(n) Concatenates chunks and compares.

Instance details

Defined in Purebred.LazyVector

Methods

compare :: V a -> V a -> Ordering

(<) :: V a -> V a -> Bool

(<=) :: V a -> V a -> Bool

(>) :: V a -> V a -> Bool

(>=) :: V a -> V a -> Bool

max :: V a -> V a -> V a

min :: V a -> V a -> V a

Show a => Show (V a) Source # 
Instance details

Defined in Purebred.LazyVector

Methods

showsPrec :: Int -> V a -> ShowS

show :: V a -> String

showList :: [V a] -> ShowS

Semigroup (V a) Source # 
Instance details

Defined in Purebred.LazyVector

Methods

(<>) :: V a -> V a -> V a

sconcat :: NonEmpty (V a) -> V a

stimes :: Integral b => b -> V a -> V a

Monoid (V a) Source # 
Instance details

Defined in Purebred.LazyVector

Methods

mempty :: V a

mappend :: V a -> V a -> V a

mconcat :: [V a] -> V a

Ixed (V a) Source # 
Instance details

Defined in Purebred.LazyVector

Methods

ix :: Index (V a) -> Traversal' (V a) (IxValue (V a))

type Index (V a) Source # 
Instance details

Defined in Purebred.LazyVector

type Index (V a) = Int
type IxValue (V a) Source # 
Instance details

Defined in Purebred.LazyVector

type IxValue (V a) = a

fromList :: Int -> [a] -> V a Source #

Lazily construct a V, slurping one chunk at a time from the input list, with chunk size n.

The minimum chunk size is 1. If the given value is less than 1, a chunk size of 1 is used.

fromChunks :: [Vector a] -> V a Source #

splitAt :: Int -> V a -> (V a, V a) Source #

O(n/c) Split the list at given index. Chunk fragmentation can occur at the boundary.