non-empty-0.3: List-like structures with static restrictions on the number of elements

Safe HaskellSafe
LanguageHaskell98

Data.Zip

Synopsis

Documentation

newtype T f a Source #

Wrap a container such that its Applicative instance is based on zip.

Constructors

Cons 

Fields

Instances

Functor f => Functor (T f) Source # 

Methods

fmap :: (a -> b) -> T f a -> T f b #

(<$) :: a -> T f b -> T f a #

(Zip f, Repeat f) => Applicative (T f) Source # 

Methods

pure :: a -> T f a #

(<*>) :: T f (a -> b) -> T f a -> T f b #

(*>) :: T f a -> T f b -> T f b #

(<*) :: T f a -> T f b -> T f a #

NFData f => NFData (T f) Source # 

Methods

rnf :: NFData a => T f a -> () Source #

(NFData f, NFData a) => NFData (T f a) Source # 

Methods

rnf :: T f a -> () #

transposeClip :: (Traversable f, Zip g, Repeat g) => f (g a) -> g (f a) Source #

Always returns a rectangular list by clipping all dimensions to the shortest slice. Be aware that transpose [] == repeat [].