EdisonAPI-1.2.2.1: A library of efficent, purely-functional data structures (API)

PortabilityGHC, Hugs (MPTC and FD)
Stabilitystable
Maintainerrobdockins AT fastmail DOT fm
Safe HaskellSafe-Inferred

Data.Edison.Seq.ListSeq

Contents

Description

This module packages the standard prelude list type as a sequence. This is the baseline sequence implementation and all methods have the default running times listed in Data.Edison.Seq, except for the following two trivial operations:

  • toList, fromList O( 1 )

Synopsis

Sequence Type

type Seq a = [a]Source

Sequence Operations

singleton :: a -> [a]Source

lcons :: a -> [a] -> [a]Source

rcons :: a -> [a] -> [a]Source

append :: [a] -> [a] -> [a]Source

lview :: Monad rm => [a] -> rm (a, [a])Source

lhead :: [a] -> aSource

lheadM :: Monad rm => [a] -> rm aSource

ltail :: [a] -> [a]Source

ltailM :: Monad rm => [a] -> rm [a]Source

rview :: Monad rm => [a] -> rm (a, [a])Source

rhead :: [a] -> aSource

rheadM :: Monad rm => [a] -> rm aSource

rtail :: [a] -> [a]Source

rtailM :: Monad rm => [a] -> rm [a]Source

null :: [a] -> BoolSource

size :: [a] -> IntSource

concat :: [[a]] -> [a]Source

reverse :: [a] -> [a]Source

reverseOnto :: [a] -> [a] -> [a]Source

fromList :: [a] -> [a]Source

toList :: [a] -> [a]Source

map :: (a -> b) -> [a] -> [b]Source

concatMap :: (a -> [b]) -> [a] -> [b]Source

fold :: (a -> b -> b) -> b -> [a] -> bSource

fold' :: (a -> b -> b) -> b -> [a] -> bSource

fold1 :: (a -> a -> a) -> [a] -> aSource

fold1' :: (a -> a -> a) -> [a] -> aSource

foldr :: (a -> b -> b) -> b -> [a] -> bSource

foldr' :: (t -> a -> a) -> a -> [t] -> aSource

foldl :: (b -> a -> b) -> b -> [a] -> bSource

foldl' :: (b -> a -> b) -> b -> [a] -> bSource

foldr1 :: (a -> a -> a) -> [a] -> aSource

foldr1' :: (a -> a -> a) -> [a] -> aSource

foldl1 :: (a -> a -> a) -> [a] -> aSource

foldl1' :: (a -> a -> a) -> [a] -> aSource

reducer :: (a -> a -> a) -> a -> [a] -> aSource

reducer' :: (a -> a -> a) -> a -> [a] -> aSource

reducel :: (a -> a -> a) -> a -> [a] -> aSource

reducel' :: (a -> a -> a) -> a -> [a] -> aSource

reduce1 :: (a -> a -> a) -> [a] -> aSource

reduce1' :: (a -> a -> a) -> [a] -> aSource

copy :: Int -> a -> [a]Source

inBounds :: Int -> [a] -> BoolSource

lookup :: Int -> [a] -> aSource

lookupM :: Monad m => Int -> [a] -> m aSource

lookupWithDefault :: a -> Int -> [a] -> aSource

update :: Int -> a -> [a] -> [a]Source

adjust :: (a -> a) -> Int -> [a] -> [a]Source

mapWithIndex :: (Int -> a -> b) -> [a] -> [b]Source

foldrWithIndex :: (Int -> a -> b -> b) -> b -> [a] -> bSource

foldrWithIndex' :: (Enum a, Num a) => (a -> t -> b -> b) -> b -> [t] -> bSource

foldlWithIndex :: (b -> Int -> a -> b) -> b -> [a] -> bSource

foldlWithIndex' :: (b -> Int -> a -> b) -> b -> [a] -> bSource

take :: Int -> [a] -> [a]Source

drop :: Int -> [a] -> [a]Source

splitAt :: Int -> [a] -> ([a], [a])Source

subseq :: Int -> Int -> [a] -> [a]Source

filter :: (a -> Bool) -> [a] -> [a]Source

partition :: (a -> Bool) -> [a] -> ([a], [a])Source

takeWhile :: (a -> Bool) -> [a] -> [a]Source

dropWhile :: (a -> Bool) -> [a] -> [a]Source

splitWhile :: (a -> Bool) -> [a] -> ([a], [a])Source

zip :: [a] -> [b] -> [(a, b)]Source

zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]Source

zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]Source

zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]Source

unzip :: [(a, b)] -> ([a], [b])Source

unzip3 :: [(a, b, c)] -> ([a], [b], [c])Source

unzipWith :: (a -> b) -> (a -> c) -> [a] -> ([b], [c])Source

unzipWith3 :: (a -> b) -> (a -> c) -> (a -> d) -> [a] -> ([b], [c], [d])Source

strict :: [a] -> [a]Source

strictWith :: (a -> b) -> [a] -> [a]Source

Unit testing

Documentation