fresnel-0.1.0.1: high-powered optics in a small package
Safe HaskellSafe-Inferred
LanguageHaskell2010

Fresnel.Semigroup.Cons1

Synopsis

Non-empty cons lists

newtype Cons1 a Source #

Constructors

Cons1 

Fields

  • runCons1 :: forall r. (a -> r) -> (a -> r -> r) -> r
     

Instances

Instances details
Foldable1 Cons1 Source # 
Instance details

Defined in Fresnel.Semigroup.Cons1

Methods

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

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

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

toNonEmpty :: Cons1 a -> NonEmpty a #

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

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

head :: Cons1 a -> a #

last :: Cons1 a -> a #

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

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

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

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

Functor Cons1 Source # 
Instance details

Defined in Fresnel.Semigroup.Cons1

Methods

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

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

Foldable Cons1 Source # 
Instance details

Defined in Fresnel.Semigroup.Cons1

Methods

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

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

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

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

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

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

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

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

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

toList :: Cons1 a -> [a] #

null :: Cons1 a -> Bool #

length :: Cons1 a -> Int #

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

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

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

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

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

Semigroup (Cons1 a) Source # 
Instance details

Defined in Fresnel.Semigroup.Cons1

Methods

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

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

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

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

Defined in Fresnel.Semigroup.Cons1

Methods

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

show :: Cons1 a -> String #

showList :: [Cons1 a] -> ShowS #

Construction

cons :: a -> Cons1 a -> Cons1 a Source #