hgeometry-combinatorial
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageGHC2021

HGeometry.Sequence.NonEmpty

Description

 
Synopsis

Documentation

data ViewL1 a Source #

NonEmpty ViewL

Constructors

a :<< (Seq a) 

Instances

Instances details
Foldable1 ViewL1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

fold1 :: Semigroup m => ViewL1 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> ViewL1 a -> m #

foldMap1' :: Semigroup m => (a -> m) -> ViewL1 a -> m #

toNonEmpty :: ViewL1 a -> NonEmpty a #

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

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

head :: ViewL1 a -> a #

last :: ViewL1 a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> ViewL1 a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> ViewL1 a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> ViewL1 a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> ViewL1 a -> b #

Functor ViewL1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

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

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

Foldable ViewL1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

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

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

foldMap' :: Monoid m => (a -> m) -> ViewL1 a -> m #

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

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

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

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

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

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

toList :: ViewL1 a -> [a] #

null :: ViewL1 a -> Bool #

length :: ViewL1 a -> Int #

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

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

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

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

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

Traversable ViewL1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

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

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

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

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

HasDirectedTraversals ViewL1 Source # 
Instance details

Defined in HGeometry.Cyclic

HasFromFoldable1 ViewL1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Traversable1 ViewL1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

traverse1 :: Apply f => (a -> f b) -> ViewL1 a -> f (ViewL1 b) Source #

sequence1 :: Apply f => ViewL1 (f b) -> f (ViewL1 b) Source #

Foldable1WithIndex Int ViewL1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

ifoldMap1 :: Semigroup m => (Int -> a -> m) -> ViewL1 a -> m Source #

ifoldMap1' :: Semigroup m => (Int -> a -> m) -> ViewL1 a -> m Source #

ifoldrMap1 :: (Int -> a -> b) -> (Int -> a -> b -> b) -> ViewL1 a -> b Source #

ifoldlMap1' :: (Int -> a -> b) -> (Int -> b -> a -> b) -> ViewL1 a -> b Source #

ifoldlMap1 :: (Int -> a -> b) -> (Int -> b -> a -> b) -> ViewL1 a -> b Source #

ifoldrMap1' :: (Int -> a -> b) -> (Int -> a -> b -> b) -> ViewL1 a -> b Source #

FoldableWithIndex Int ViewL1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

ifoldMap :: Monoid m => (Int -> a -> m) -> ViewL1 a -> m Source #

ifoldMap' :: Monoid m => (Int -> a -> m) -> ViewL1 a -> m Source #

ifoldr :: (Int -> a -> b -> b) -> b -> ViewL1 a -> b Source #

ifoldl :: (Int -> b -> a -> b) -> b -> ViewL1 a -> b Source #

ifoldr' :: (Int -> a -> b -> b) -> b -> ViewL1 a -> b Source #

ifoldl' :: (Int -> b -> a -> b) -> b -> ViewL1 a -> b Source #

FunctorWithIndex Int ViewL1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

imap :: (Int -> a -> b) -> ViewL1 a -> ViewL1 b Source #

TraversableWithIndex Int ViewL1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

itraverse :: Applicative f => (Int -> a -> f b) -> ViewL1 a -> f (ViewL1 b) Source #

NFData a => NFData (ViewL1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

rnf :: ViewL1 a -> () #

Semigroup (ViewL1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

(<>) :: ViewL1 a -> ViewL1 a -> ViewL1 a #

sconcat :: NonEmpty (ViewL1 a) -> ViewL1 a #

stimes :: Integral b => b -> ViewL1 a -> ViewL1 a #

Generic (ViewL1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Associated Types

type Rep (ViewL1 a) 
Instance details

Defined in HGeometry.Sequence.NonEmpty

type Rep (ViewL1 a) = D1 ('MetaData "ViewL1" "HGeometry.Sequence.NonEmpty" "hgeometry-combinatorial-1.0.0.0-inplace" 'False) (C1 ('MetaCons ":<<" ('InfixI 'LeftAssociative 9) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq a))))

Methods

from :: ViewL1 a -> Rep (ViewL1 a) x #

to :: Rep (ViewL1 a) x -> ViewL1 a #

IsList (ViewL1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Associated Types

type Item (ViewL1 a) 
Instance details

Defined in HGeometry.Sequence.NonEmpty

type Item (ViewL1 a) = a

Methods

fromList :: [Item (ViewL1 a)] -> ViewL1 a #

fromListN :: Int -> [Item (ViewL1 a)] -> ViewL1 a #

toList :: ViewL1 a -> [Item (ViewL1 a)] #

Read a => Read (ViewL1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

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

Defined in HGeometry.Sequence.NonEmpty

Methods

showsPrec :: Int -> ViewL1 a -> ShowS #

show :: ViewL1 a -> String #

showList :: [ViewL1 a] -> ShowS #

Eq a => Eq (ViewL1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

(==) :: ViewL1 a -> ViewL1 a -> Bool #

(/=) :: ViewL1 a -> ViewL1 a -> Bool #

Ord a => Ord (ViewL1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

compare :: ViewL1 a -> ViewL1 a -> Ordering #

(<) :: ViewL1 a -> ViewL1 a -> Bool #

(<=) :: ViewL1 a -> ViewL1 a -> Bool #

(>) :: ViewL1 a -> ViewL1 a -> Bool #

(>=) :: ViewL1 a -> ViewL1 a -> Bool #

max :: ViewL1 a -> ViewL1 a -> ViewL1 a #

min :: ViewL1 a -> ViewL1 a -> ViewL1 a #

Ixed (ViewL1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

ix :: Index (ViewL1 a) -> Traversal' (ViewL1 a) (IxValue (ViewL1 a)) Source #

Reversing (ViewL1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

reversing :: ViewL1 a -> ViewL1 a Source #

type Rep (ViewL1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

type Rep (ViewL1 a) = D1 ('MetaData "ViewL1" "HGeometry.Sequence.NonEmpty" "hgeometry-combinatorial-1.0.0.0-inplace" 'False) (C1 ('MetaCons ":<<" ('InfixI 'LeftAssociative 9) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq a))))
type Item (ViewL1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

type Item (ViewL1 a) = a
type Index (ViewL1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

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

Defined in HGeometry.Sequence.NonEmpty

type IxValue (ViewL1 a) = a

data ViewR1 a Source #

NonEmpty ViewR

Constructors

(Seq a) :>> a 

Instances

Instances details
Foldable1 ViewR1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

fold1 :: Semigroup m => ViewR1 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> ViewR1 a -> m #

foldMap1' :: Semigroup m => (a -> m) -> ViewR1 a -> m #

toNonEmpty :: ViewR1 a -> NonEmpty a #

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

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

head :: ViewR1 a -> a #

last :: ViewR1 a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> ViewR1 a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> ViewR1 a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> ViewR1 a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> ViewR1 a -> b #

Functor ViewR1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

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

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

Foldable ViewR1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

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

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

foldMap' :: Monoid m => (a -> m) -> ViewR1 a -> m #

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

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

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

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

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

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

toList :: ViewR1 a -> [a] #

null :: ViewR1 a -> Bool #

length :: ViewR1 a -> Int #

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

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

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

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

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

Traversable ViewR1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

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

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

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

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

HasFromFoldable1 ViewR1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Traversable1 ViewR1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

traverse1 :: Apply f => (a -> f b) -> ViewR1 a -> f (ViewR1 b) Source #

sequence1 :: Apply f => ViewR1 (f b) -> f (ViewR1 b) Source #

Foldable1WithIndex Int ViewR1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

ifoldMap1 :: Semigroup m => (Int -> a -> m) -> ViewR1 a -> m Source #

ifoldMap1' :: Semigroup m => (Int -> a -> m) -> ViewR1 a -> m Source #

ifoldrMap1 :: (Int -> a -> b) -> (Int -> a -> b -> b) -> ViewR1 a -> b Source #

ifoldlMap1' :: (Int -> a -> b) -> (Int -> b -> a -> b) -> ViewR1 a -> b Source #

ifoldlMap1 :: (Int -> a -> b) -> (Int -> b -> a -> b) -> ViewR1 a -> b Source #

ifoldrMap1' :: (Int -> a -> b) -> (Int -> a -> b -> b) -> ViewR1 a -> b Source #

FoldableWithIndex Int ViewR1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

ifoldMap :: Monoid m => (Int -> a -> m) -> ViewR1 a -> m Source #

ifoldMap' :: Monoid m => (Int -> a -> m) -> ViewR1 a -> m Source #

ifoldr :: (Int -> a -> b -> b) -> b -> ViewR1 a -> b Source #

ifoldl :: (Int -> b -> a -> b) -> b -> ViewR1 a -> b Source #

ifoldr' :: (Int -> a -> b -> b) -> b -> ViewR1 a -> b Source #

ifoldl' :: (Int -> b -> a -> b) -> b -> ViewR1 a -> b Source #

FunctorWithIndex Int ViewR1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

imap :: (Int -> a -> b) -> ViewR1 a -> ViewR1 b Source #

TraversableWithIndex Int ViewR1 Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

itraverse :: Applicative f => (Int -> a -> f b) -> ViewR1 a -> f (ViewR1 b) Source #

NFData a => NFData (ViewR1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

rnf :: ViewR1 a -> () #

Semigroup (ViewR1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

(<>) :: ViewR1 a -> ViewR1 a -> ViewR1 a #

sconcat :: NonEmpty (ViewR1 a) -> ViewR1 a #

stimes :: Integral b => b -> ViewR1 a -> ViewR1 a #

Generic (ViewR1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Associated Types

type Rep (ViewR1 a) 
Instance details

Defined in HGeometry.Sequence.NonEmpty

type Rep (ViewR1 a) = D1 ('MetaData "ViewR1" "HGeometry.Sequence.NonEmpty" "hgeometry-combinatorial-1.0.0.0-inplace" 'False) (C1 ('MetaCons ":>>" ('InfixI 'LeftAssociative 9) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

Methods

from :: ViewR1 a -> Rep (ViewR1 a) x #

to :: Rep (ViewR1 a) x -> ViewR1 a #

IsList (ViewR1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Associated Types

type Item (ViewR1 a) 
Instance details

Defined in HGeometry.Sequence.NonEmpty

type Item (ViewR1 a) = a

Methods

fromList :: [Item (ViewR1 a)] -> ViewR1 a #

fromListN :: Int -> [Item (ViewR1 a)] -> ViewR1 a #

toList :: ViewR1 a -> [Item (ViewR1 a)] #

Read a => Read (ViewR1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

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

Defined in HGeometry.Sequence.NonEmpty

Methods

showsPrec :: Int -> ViewR1 a -> ShowS #

show :: ViewR1 a -> String #

showList :: [ViewR1 a] -> ShowS #

Eq a => Eq (ViewR1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

(==) :: ViewR1 a -> ViewR1 a -> Bool #

(/=) :: ViewR1 a -> ViewR1 a -> Bool #

Ord a => Ord (ViewR1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

compare :: ViewR1 a -> ViewR1 a -> Ordering #

(<) :: ViewR1 a -> ViewR1 a -> Bool #

(<=) :: ViewR1 a -> ViewR1 a -> Bool #

(>) :: ViewR1 a -> ViewR1 a -> Bool #

(>=) :: ViewR1 a -> ViewR1 a -> Bool #

max :: ViewR1 a -> ViewR1 a -> ViewR1 a #

min :: ViewR1 a -> ViewR1 a -> ViewR1 a #

Ixed (ViewR1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

ix :: Index (ViewR1 a) -> Traversal' (ViewR1 a) (IxValue (ViewR1 a)) Source #

Reversing (ViewR1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

Methods

reversing :: ViewR1 a -> ViewR1 a Source #

type Rep (ViewR1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

type Rep (ViewR1 a) = D1 ('MetaData "ViewR1" "HGeometry.Sequence.NonEmpty" "hgeometry-combinatorial-1.0.0.0-inplace" 'False) (C1 ('MetaCons ":>>" ('InfixI 'LeftAssociative 9) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
type Item (ViewR1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

type Item (ViewR1 a) = a
type Index (ViewR1 a) Source # 
Instance details

Defined in HGeometry.Sequence.NonEmpty

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

Defined in HGeometry.Sequence.NonEmpty

type IxValue (ViewR1 a) = a

viewl1 :: ViewR1 a -> ViewL1 a Source #

View the leftmost element

viewr1 :: ViewL1 a -> ViewR1 a Source #

View the rightmost element

(|>>) :: ViewR1 a -> a -> ViewR1 a infixl 5 Source #

snoc an element to the right

(<>>) :: ViewR1 a -> Seq a -> ViewR1 a infixl 5 Source #

Append a Sequence to a ViewR1

splitL1At :: Int -> ViewL1 a -> Maybe (Seq a, a, Seq a) Source #

Given an index i, and a viewL1 s, attempts to split s at index i. Returns nothing if the index is out of range.

splitR1At :: Int -> ViewR1 a -> Maybe (Seq a, a, Seq a) Source #

Given an index i, and a viewL1 s, attempts to split s at index i. Returns nothing if the index is out of range.