acme-cofunctor: A Cofunctor is a structure from category theory dual to Functor

[ acme, bsd3, library ] [ Propose Tags ]

A Cofunctor is a structure from category theory dual to Functor.

A Functor is defined by the operation fmap:

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

This means that its dual must be defined by the following operation:

cofmap :: (b -> a) -> (f b -> f a)

Since beginning his investigations, the author of this package has discovered that this pattern is at least as commonly used as Functor. In fact, many ubiquitous Haskell types (e.g. [], Maybe, ((->) a) turn out to have a Cofunctor instance.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.1.0
Change log CHANGELOG.md
Dependencies base (>=4 && <5) [details]
License BSD-3-Clause
Copyright 2014 Jasper Van der Jeugt
Author Jasper Van der Jeugt <m@jaspervdj.be>
Maintainer Jasper Van der Jeugt <m@jaspervdj.be>
Category Acme
Home page https://github.com/jaspervdj/acme-cofunctor
Source repo head: git clone https://github.com/jaspervdj/acme-cofunctor
Uploaded by JasperVanDerJeugt at 2017-05-13T10:15:09Z
Distributions NixOS:0.1.1.0
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 2191 total (11 in the last 30 days)
Rating 2.0 (votes: 2) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-05-13 [all 1 reports]

Readme for acme-cofunctor-0.1.1.0

[back to package description]

acme-cofunctor

A Cofunctor is a structure from category theory dual to Functor.

We all know that a Functor is defined by the operation 'fmap':

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

This means that its dual must be defined by the following operation:

cofmap :: (b -> a) -> (f b -> f a)

Since beginning his investigations, the author of this package has discovered that this pattern is at least as commonly used as Functor. In fact, many ubiquitous Haskell types (e.g. [], Maybe, ((->) a) turn out to have a Cofunctor instance.