Control.Applicative (original) (raw)

Applicative ZipList Source #

f <$> ZipList xs1 <*> ... <*> ZipList xsN = ZipList (zipWithN f xs1 ... xsN)

where zipWithN refers to the zipWith function of the appropriate arity (zipWith, zipWith3, zipWith4, ...). For example:

(\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..] = ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..]) = ZipList {getZipList = ["a5","b6b6","c7c7c7"]}

Since: base-2.1

Instance details

Defined in Control.Applicative

Applicative Complex Source #

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Applicative Identity Source #

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Applicative First Source #

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Applicative Last Source #

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Applicative Down Source #

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Applicative First Source #

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Applicative Last Source #

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Applicative Max Source #

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Applicative Min Source #

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Applicative Dual Source #

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Applicative Product Source #

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Applicative Sum Source #

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Applicative NonEmpty Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Applicative STM Source #

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Applicative NoIO Source #

Since: base-4.8.0.0

Instance details

Defined in GHC.GHCi

Applicative Par1 Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Applicative ReadP Source #

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Applicative ReadPrec Source #

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadPrec

Applicative IO Source #

Since: base-2.1

Instance details

Defined in GHC.Base

Applicative Maybe Source #

Since: base-2.1

Instance details

Defined in GHC.Base

Applicative Solo Source #

Since: base-4.15

Instance details

Defined in GHC.Base

Applicative [] Source #

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> [a] Source #

(<*>) :: [a -> b] -> [a] -> [b] Source #

liftA2 :: (a -> b -> c) -> [a] -> [b] -> [c] Source #

(*>) :: [a] -> [b] -> [b] Source #

(<*) :: [a] -> [b] -> [a] Source #

Monad m => Applicative (WrappedMonad m) Source #

Since: base-2.1

Instance details

Defined in Control.Applicative

Arrow a => Applicative (ArrowMonad a) Source #

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Applicative (ST s) Source #

Since: base-2.1

Instance details

Defined in Control.Monad.ST.Lazy.Imp

Applicative (Either e) Source #

Since: base-3.0

Instance details

Defined in Data.Either

Applicative (Proxy :: Type -> Type) Source #

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Applicative (U1 :: Type -> Type) Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Applicative (ST s) Source #

Since: base-4.4.0.0

Instance details

Defined in GHC.ST

Monoid a => Applicative ((,) a) Source #

For tuples, the [Monoid](Data-Monoid.html#t:Monoid "Data.Monoid") constraint on a determines how the first values merge. For example, [String](Data-String.html#t:String "Data.String")s concatenate:

("hello ", (+15)) <*> ("world!", 2002) ("hello world!",2017)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a0 -> (a, a0) Source #

(<*>) :: (a, a0 -> b) -> (a, a0) -> (a, b) Source #

liftA2 :: (a0 -> b -> c) -> (a, a0) -> (a, b) -> (a, c) Source #

(*>) :: (a, a0) -> (a, b) -> (a, b) Source #

(<*) :: (a, a0) -> (a, b) -> (a, a0) Source #

Arrow a => Applicative (WrappedArrow a b) Source #

Since: base-2.1

Instance details

Defined in Control.Applicative

Applicative m => Applicative (Kleisli m a) Source #

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Monoid m => Applicative (Const m :: Type -> Type) Source #

Since: base-2.0.1

Instance details

Defined in Data.Functor.Const

Applicative f => Applicative (Ap f) Source #

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Applicative f => Applicative (Alt f) Source #

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

(Generic1 f, Applicative (Rep1 f)) => Applicative (Generically1 f) Source #

Since: base-4.17.0.0

Instance details

Defined in GHC.Generics

Applicative f => Applicative (Rec1 f) Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

(Monoid a, Monoid b) => Applicative ((,,) a b) Source #

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

pure :: a0 -> (a, b, a0) Source #

(<*>) :: (a, b, a0 -> b0) -> (a, b, a0) -> (a, b, b0) Source #

liftA2 :: (a0 -> b0 -> c) -> (a, b, a0) -> (a, b, b0) -> (a, b, c) Source #

(*>) :: (a, b, a0) -> (a, b, b0) -> (a, b, b0) Source #

(<*) :: (a, b, a0) -> (a, b, b0) -> (a, b, a0) Source #

(Applicative f, Applicative g) => Applicative (Product f g) Source #

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

(Applicative f, Applicative g) => Applicative (f :*: g) Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Monoid c => Applicative (K1 i c :: Type -> Type) Source #

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

(Monoid a, Monoid b, Monoid c) => Applicative ((,,,) a b c) Source #

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

pure :: a0 -> (a, b, c, a0) Source #

(<*>) :: (a, b, c, a0 -> b0) -> (a, b, c, a0) -> (a, b, c, b0) Source #

liftA2 :: (a0 -> b0 -> c0) -> (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, c0) Source #

(*>) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, b0) Source #

(<*) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, a0) Source #

Applicative ((->) r) Source #

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> r -> a Source #

(<*>) :: (r -> (a -> b)) -> (r -> a) -> r -> b Source #

liftA2 :: (a -> b -> c) -> (r -> a) -> (r -> b) -> r -> c Source #

(*>) :: (r -> a) -> (r -> b) -> r -> b Source #

(<*) :: (r -> a) -> (r -> b) -> r -> a Source #

(Applicative f, Applicative g) => Applicative (Compose f g) Source #

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

(Applicative f, Applicative g) => Applicative (f :.: g) Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Applicative f => Applicative (M1 i c f) Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics