foundation-0.0.23: Alternative prelude with batteries and no dependencies

License | BSD-style
Maintainer | Nicolas Di Prima <nicolas@primetype.co.uk>
Stability | statble
Portability | portable
Safe Haskell | None
Language | Haskell2010

Foundation.List.DList

Description

Data structure for optimised operations (append, cons, snoc) on list

# Documentation

data DList a Source #

Instances

Monad DList Source # |
Instance details Defined in Foundation.List.DList Methods (>>=) :: DList a -> (a -> DList b) -> DList b Source # (>>) :: DList a -> DList b -> DList b Source # return :: a -> DList a Source # fail :: String -> DList a Source #
Functor DList Source # |
Instance details Defined in Foundation.List.DList Methods fmap :: (a -> b) -> DList a -> DList b Source # (<$) :: a -> DList b -> DList a Source #
Applicative DList Source # |
Instance details Defined in Foundation.List.DList Methods pure :: a -> DList a Source # (<*>) :: DList (a -> b) -> DList a -> DList b Source # liftA2 :: (a -> b -> c) -> DList a -> DList b -> DList c Source # (*>) :: DList a -> DList b -> DList b Source # (<*) :: DList a -> DList b -> DList a Source #
IsList (DList a) Source # |
Instance details Defined in Foundation.List.DList Associated Types type Item (DList a) :: Type Source # Methods fromList :: [Item (DList a)] -> DList a Source # fromListN :: Int -> [Item (DList a)] -> DList a Source # toList :: DList a -> [Item (DList a)] Source #
Eq a => Eq (DList a) Source # |
Instance details Defined in Foundation.List.DList Methods (==) :: DList a -> DList a -> Bool Source # (/=) :: DList a -> DList a -> Bool Source #
Ord a => Ord (DList a) Source # |
Instance details Defined in Foundation.List.DList Methods compare :: DList a -> DList a -> Ordering Source # (<) :: DList a -> DList a -> Bool Source # (<=) :: DList a -> DList a -> Bool Source # (>) :: DList a -> DList a -> Bool Source # (>=) :: DList a -> DList a -> Bool Source # max :: DList a -> DList a -> DList a Source # min :: DList a -> DList a -> DList a Source #
Show a => Show (DList a) Source # |
Instance details Defined in Foundation.List.DList Methods showsPrec :: Int -> DList a -> ShowS Source # show :: DList a -> String Source # showList :: [DList a] -> ShowS Source #
Semigroup (DList a) Source # |
Instance details Defined in Foundation.List.DList Methods (<>) :: DList a -> DList a -> DList a Source # sconcat :: NonEmpty (DList a) -> DList a Source # stimes :: Integral b => b -> DList a -> DList a Source #
Monoid (DList a) Source # |
Instance details Defined in Foundation.List.DList Methods mempty :: DList a Source # mappend :: DList a -> DList a -> DList a Source # mconcat :: [DList a] -> DList a Source #
Collection (DList a) Source # |

Instance details

Defined in Foundation.List.DList

Methods

null :: DList a -> Bool Source #

length :: DList a -> CountOf (Element (DList a)) Source #

elem :: (Eq a0, a0 ~ Element (DList a)) => Element (DList a) -> DList a -> Bool Source #

notElem :: (Eq a0, a0 ~ Element (DList a)) => Element (DList a) -> DList a -> Bool Source #

maximum :: (Ord a0, a0 ~ Element (DList a)) => NonEmpty (DList a) -> Element (DList a) Source #

minimum :: (Ord a0, a0 ~ Element (DList a)) => NonEmpty (DList a) -> Element (DList a) Source #

any :: (Element (DList a) -> Bool) -> DList a -> Bool Source #

all :: (Element (DList a) -> Bool) -> DList a -> Bool Source #

Foldable (DList a) Source # |
Instance details Defined in Foundation.List.DList Methods foldl' :: (a0 -> Element (DList a) -> a0) -> a0 -> DList a -> a0 Source # foldr :: (Element (DList a) -> a0 -> a0) -> a0 -> DList a -> a0 Source # foldr' :: (Element (DList a) -> a0 -> a0) -> a0 -> DList a -> a0 Source #
Sequential (DList a) Source # |

Instance details

Defined in Foundation.List.DList

Methods

take :: CountOf (Element (DList a)) -> DList a -> DList a Source #

revTake :: CountOf (Element (DList a)) -> DList a -> DList a Source #

drop :: CountOf (Element (DList a)) -> DList a -> DList a Source #

revDrop :: CountOf (Element (DList a)) -> DList a -> DList a Source #

splitAt :: CountOf (Element (DList a)) -> DList a -> (DList a, DList a) Source #

revSplitAt :: CountOf (Element (DList a)) -> DList a -> (DList a, DList a) Source #

splitOn :: (Element (DList a) -> Bool) -> DList a -> [DList a] Source #

break :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) Source #

breakEnd :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) Source #

breakElem :: Element (DList a) -> DList a -> (DList a, DList a) Source #

takeWhile :: (Element (DList a) -> Bool) -> DList a -> DList a Source #

dropWhile :: (Element (DList a) -> Bool) -> DList a -> DList a Source #

intersperse :: Element (DList a) -> DList a -> DList a Source #

intercalate :: Element (DList a) -> DList a -> Element (DList a) Source #

span :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) Source #

spanEnd :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) Source #

filter :: (Element (DList a) -> Bool) -> DList a -> DList a Source #

partition :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) Source #

reverse :: DList a -> DList a Source #

uncons :: DList a -> Maybe (Element (DList a), DList a) Source #

unsnoc :: DList a -> Maybe (DList a, Element (DList a)) Source #

snoc :: DList a -> Element (DList a) -> DList a Source #

cons :: Element (DList a) -> DList a -> DList a Source #

find :: (Element (DList a) -> Bool) -> DList a -> Maybe (Element (DList a)) Source #

sortBy :: (Element (DList a) -> Element (DList a) -> Ordering) -> DList a -> DList a Source #

singleton :: Element (DList a) -> DList a Source #

head :: NonEmpty (DList a) -> Element (DList a) Source #

last :: NonEmpty (DList a) -> Element (DList a) Source #

tail :: NonEmpty (DList a) -> DList a Source #

init :: NonEmpty (DList a) -> DList a Source #

replicate :: CountOf (Element (DList a)) -> Element (DList a) -> DList a Source #

isPrefixOf :: DList a -> DList a -> Bool Source #

isSuffixOf :: DList a -> DList a -> Bool Source #

isInfixOf :: DList a -> DList a -> Bool Source #

stripPrefix :: DList a -> DList a -> Maybe (DList a) Source #

stripSuffix :: DList a -> DList a -> Maybe (DList a) Source #

type Item (DList a) Source # |
Instance details Defined in Foundation.List.DList type Item (DList a) = a
type Element (DList a) Source # |
Instance details Defined in Foundation.List.DList type Element (DList a) = a