From bace6b5c5a26612de8f7f1839e057b034b7ee98e Mon Sep 17 00:00:00 2001 From: laurens Date: Fri, 30 Sep 2016 22:51:27 +0200 Subject: [PATCH 1/2] Link to dependent specifications --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 39ec841..7dcf5b0 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ A value which has a Semigroup must provide a `concat` method. The ### Monoid A value that implements the Monoid specification must also implement -the Semigroup specification. +the [Semigroup](#semigroup) specification. 1. `m.concat(m.empty())` is equivalent to `m` (right identity) 2. `m.empty().concat(m)` is equivalent to `m` (left identity) @@ -356,7 +356,7 @@ or its `constructor` object. The `chainRec` method takes two arguments: ### Monad A value that implements the Monad specification must also implement -the Applicative and Chain specifications. +the [Applicative](#applicative) and [Chain](#chain) specifications. 1. `m.of(a).chain(f)` is equivalent to `f(a)` (left identity) 2. `m.chain(m.of)` is equivalent to `m` (right identity) @@ -409,7 +409,7 @@ The `extract` method takes no arguments: ### Bifunctor A value that implements the Bifunctor specification must also implement -the Functor specification. +the [Functor](#functor) specification. 1. `p.bimap(a => a, b => b)` is equivalent to `p` (identity) 2. `p.bimap(a => f(g(a)), b => h(i(b))` is equivalent to `p.bimap(g, i).bimap(f, h)` (composition) @@ -440,7 +440,7 @@ method takes two arguments: ### Profunctor A value that implements the Profunctor specification must also implement -the Functor specification. +the [Functor](#functor) specification. 1. `p.promap(a => a, b => b)` is equivalent to `p` (identity) 2. `p.promap(a => f(g(a)), b => h(i(b)))` is equivalent to `p.promap(f, i).promap(g, h)` (composition) From 98368aad1c0f96ff9048b45230b6b01991e4d26d Mon Sep 17 00:00:00 2001 From: laurens Date: Mon, 3 Oct 2016 17:44:33 +0200 Subject: [PATCH 2/2] Link to even more dependent specifications --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7dcf5b0..692319a 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ method takes one argument: ### Apply A value that implements the Apply specification must also -implement the Functor specification. +implement the [Functor](#functor) specification. 1. `v.ap(u.ap(a.map(f => g => x => f(g(x)))))` is equivalent to `v.ap(u).ap(a)` (composition) @@ -201,7 +201,7 @@ method takes one argument: ### Applicative A value that implements the Applicative specification must also -implement the Apply specification. +implement the [Apply](#apply) specification. 1. `v.ap(a.of(x => x))` is equivalent to `v` (identity) 2. `a.of(x).ap(a.of(f))` is equivalent to `a.of(f(x))` (homomorphism) @@ -249,7 +249,7 @@ method takes two arguments: ### Traversable A value that implements the Traversable specification must also -implement the Functor and Foldable specifications. +implement the [Functor](#functor) and [Foldable](#foldable) specifications. 1. `t(u.traverse(x => x, F.of))` is equivalent to `u.traverse(t, G.of)` for any `t` such that `t(a).map(f)` is equivalent to `t(a.map(f))` (naturality) @@ -300,7 +300,7 @@ method takes two arguments: ### Chain A value that implements the Chain specification must also -implement the Apply specification. +implement the [Apply](#apply) specification. 1. `m.chain(f).chain(g)` is equivalent to `m.chain(x => f(x).chain(g))` (associativity) @@ -325,7 +325,7 @@ method takes one argument: ### ChainRec -A value that implements the ChainRec specification must also implement the Chain specification. +A value that implements the ChainRec specification must also implement the [Chain](#chain) specification. 1. `m.chainRec((next, done, v) => p(v) ? d(v).map(done) : n(v).map(next), i)` is equivalent to @@ -386,7 +386,7 @@ method takes one argument: ### Comonad -A value that implements the Comonad specification must also implement the Functor and Extend specifications. +A value that implements the Comonad specification must also implement the [Functor](#functor) and [Extend](#extend) specifications. 1. `w.extend(_w => _w.extract())` is equivalent to `w` 2. `w.extend(f).extract()` is equivalent to `f(w)`