Skip to content

Commit

Permalink
adds a contravariant functor to spec
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmk committed Aug 21, 2016
1 parent 1850c6c commit 3591965
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ to that of the derivation (or derivations).
* [Monoid](#monoid)
* [Functor](#functor)
* [Bifunctor](#bifunctor)
* [Contravariant Functor](#contravariant functor)
* [Profunctor](#profunctor)
* [Apply](#apply)
* [Applicative](#applicative)
Expand Down Expand Up @@ -166,11 +167,24 @@ to that of the derivation (or derivations).



## Contravariant Functor

#### Methods

1. `contramap :: ContravariantFunctor f => (a → b, f b) → f a`

#### Laws

1. Identity: `F.contramap(x => x, a) ≡ a`
1. Composition: `F.contramap(x => f(g(x)), a) ≡ F.contramap(g, F.contramap(f, a))`


## Profunctor

#### Dependencies

1. Functor
2. Contravariant Functor

#### Methods

Expand Down

0 comments on commit 3591965

Please sign in to comment.