Functor -is:module

A type f is a Functor if it provides a function fmap which, given any types a and b lets you apply any function from (a -> b) to turn an f a into an f b, preserving the structure of f. Furthermore f needs to adhere to the following: Note, that the second law follows from the free theorem of the type fmap and the first law, so you need only check that the former condition holds. See these articles by School of Haskell or David Luposchainsky for an explanation.
A type f is a Functor if it provides a function fmap which, given any types a and b lets you apply any function from (a -> b) to turn an f a into an f b, preserving the structure of f. Furthermore f needs to adhere to the following: Note, that the second law follows from the free theorem of the type fmap and the first law, so you need only check that the former condition holds. See https://www.schoolofhaskell.com/user/edwardk/snippets/fmap or https://github.com/quchen/articles/blob/master/second_functor_law.md for an explanation.
A type f is a Functor if it provides a function fmap which, given any types a and b lets you apply any function from (a -> b) to turn an f a into an f b, preserving the structure of f. Furthermore f needs to adhere to the following: Note, that the second law follows from the free theorem of the type fmap and the first law, so you need only check that the former condition holds. See https://www.schoolofhaskell.com/user/edwardk/snippets/fmap or https://github.com/quchen/articles/blob/master/second_functor_law.md for an explanation.
A type f is a Functor if it provides a function fmap which, given any types a and b lets you apply any function from (a -> b) to turn an f a into an f b, preserving the structure of f. Furthermore f needs to adhere to the following: Note, that the second law follows from the free theorem of the type fmap and the first law, so you need only check that the former condition holds.
The Functor class is used for types that can be mapped over. Instances of Functor should satisfy the following laws:
fmap id  ==  id
fmap (f . g)  ==  fmap f . fmap g
The instances of Functor for lists, Maybe and IO satisfy these laws.
The Functor class is used for types that can be mapped over. Instances of Functor should satisfy the following laws:
fmap id  ==  id
fmap (f . g)  ==  fmap f . fmap g
The instances of Functor for lists, Maybe and IO satisfy these laws.
Equivalent of Functor for rank 2 data types, satisfying the usual functor laws
id <$> g == g
(p . q) <$> g == p <$> (q <$> g)
An invariant version of Functor, equivalent to Invariant.
Properties to check that the Functor m satisfies the functor properties.
Option --functor. Make AST functorial?
Not on Stackage, so not searched. Functors
A Functor with an additional index. Instances must satisfy a modified form of the Functor laws:
imap f . imap g ≡ imap (\i -> f i . g i)
imap (\_ a -> a) ≡ id
Barbie-types that can be mapped over. Instances of FunctorB should satisfy the following laws:
bmap id = id
bmap f . bmap g = bmap (f . g)
There is a default bmap implementation for Generic types, so instances can derived automatically.
An adapter newtype, suitable for DerivingVia. Its Eq1, Ord1, Read1, and Show1 instances leverage Generic1-based defaults.
A Functor with an additional index. Instances must satisfy a modified form of the Functor laws:
imap f . imap g ≡ imap (\i -> f i . g i)
imap (\_ a -> a) ≡ id
Deprecated: Use Filterable from Data.Witherable instead
Barbie-types that can be mapped over. Instances of FunctorB should satisfy the following laws:
bmap id = id
bmap f . bmap g = bmap (f . g)
There is a default bmap implementation for Generic types, so instances can derived automatically.
Functor from indexed-types to indexed-types. Instances of FunctorT should satisfy the following laws:
tmap id = id
tmap f . tmap g = tmap (f . g)
There is a default tmap implementation for Generic types, so instances can derived automatically.
A parameterized type that is a functor on all instances.
A parameterized type that is a functor on all instances. Laws:
Barbie-types that can be mapped over. Instances of FunctorB should satisfy the following laws:
bmap id = id
bmap f . bmap g = bmap (f . g)
There is a default bmap implementation for Generic types, so instances can derived automatically.