Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
polytypic committed Dec 1, 2018
1 parent bf9271c commit d0c5f8b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1741,7 +1741,7 @@ monad](https://buzzdecafe.github.io/2018/04/10/no-promises-are-not-monads),
which explains the "monadish". Fortunately one usually does not want nested
promises in which case the approximation can be close enough.

##### <a id="l-select-applicative"></a> [](#contents) [](https://calmm-js.github.io/partial.lenses/index.html#l-Constant) [`L.Select ~> Applicative`](#l-select-applicative "L.Select: Applicative") <small><sup>v14.0.0</sup></small>
##### <a id="l-select-applicative"></a> [](#contents) [](https://calmm-js.github.io/partial.lenses/index.html#l-select-applicative) [`L.Select ~> Applicative`](#l-select-applicative "L.Select: Applicative") <small><sup>v14.0.0</sup></small>

`L.Select` is the [Static
Land](https://github.com/rpominov/static-land/blob/master/docs/spec.md)
Expand All @@ -1766,7 +1766,7 @@ It is a monoid, because it satisfies the Monoid laws:
```js
const MonoidLaws = (M, x, y, z) => ({
associativity: test(M.concat(M.concat(x, y), z), M.concat(x, M.concat(y, z))),
leftIdentity: test(M.concat(M.empty(), x), x) ,
leftIdentity: test(M.concat(M.empty(), x), x),
rightIdentity: test(M.concat(x, M.empty()), x)
})

Expand Down Expand Up @@ -5561,7 +5561,7 @@ collections and back).
* `undefined` is not a valid JSON value and does not get mixed up with valid
JSON values.
* We can form a [monoid over JavaScript values by treating `undefined` as
zero](#l-select).
zero](#l-select-applicative).

Some libraries use `null`, but that is arguably a poor choice, because `null` is
a valid JSON value, which means that when accessing JSON data a result of `null`
Expand All @@ -5586,7 +5586,8 @@ because applicatives do not have a join operation and are not nested like
monads.

Not having an explicit `Just` object means that dealing with values such as
`Just Nothing` requires special consideration.
`Just Nothing` requires special consideration (but like mentioned above, such
constructs are not needed internally by optics).

#### <a id="allowing-strings-and-integers-as-optics"></a> [](#contents) [](https://calmm-js.github.io/partial.lenses/index.html#allowing-strings-and-integers-as-optics) [Allowing strings and integers as optics](#allowing-strings-and-integers-as-optics)

Expand Down
9 changes: 5 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,7 @@ <h5><a id="l-identityasync"></a> <a href="#contents">≡</a> <a href="https://gi
monad</a>,
which explains the &quot;monadish&quot;. Fortunately one usually does not want nested
promises in which case the approximation can be close enough.</p>
<h5><a id="l-select-applicative"></a> <a href="#contents"></a> <a href="https://github.com/calmm-js/partial.lenses/blob/master/README.md#l-Constant"></a> <a href="#l-select-applicative" title="L.Select: Applicative"><code>L.Select ~&gt; Applicative</code></a> <small><sup>v14.0.0</sup></small></h5>
<h5><a id="l-select-applicative"></a> <a href="#contents"></a> <a href="https://github.com/calmm-js/partial.lenses/blob/master/README.md#l-select-applicative"></a> <a href="#l-select-applicative" title="L.Select: Applicative"><code>L.Select ~&gt; Applicative</code></a> <small><sup>v14.0.0</sup></small></h5>
<p><code>L.Select</code> is the <a href="https://github.com/rpominov/static-land/blob/master/docs/spec.md">Static
Land</a>
compatible
Expand All @@ -1492,7 +1492,7 @@ <h5><a id="l-select-applicative"></a> <a href="#contents">≡</a> <a href="https
<p>It is a monoid, because it satisfies the Monoid laws:</p>
<pre><code class="hljs lang-js">var MonoidLaws = (M, x, y, z) =&gt; ({
associativity: test(M.concat(M.concat(x, y), z), M.concat(x, M.concat(y, z))),
leftIdentity: test(M.concat(M.empty(), x), x) ,
leftIdentity: test(M.concat(M.empty(), x), x),
rightIdentity: test(M.concat(x, M.empty()), x)
})

Expand Down Expand Up @@ -3867,7 +3867,7 @@ <h4><a id="use-of-undefined"></a> <a href="#contents">≡</a> <a href="https://g
value.</li>
<li><code>undefined</code> is not a valid JSON value and does not get mixed up with valid
JSON values.</li>
<li>We can form a <a href="#l-select">monoid over JavaScript values by treating <code>undefined</code> as
<li>We can form a <a href="#l-select-applicative">monoid over JavaScript values by treating <code>undefined</code> as
zero</a>.</li>
</ul>
<p>Some libraries use <code>null</code>, but that is arguably a poor choice, because <code>null</code> is
Expand All @@ -3890,7 +3890,8 @@ <h4><a id="use-of-undefined"></a> <a href="#contents">≡</a> <a href="https://g
because applicatives do not have a join operation and are not nested like
monads.</p>
<p>Not having an explicit <code>Just</code> object means that dealing with values such as
<code>Just Nothing</code> requires special consideration.</p>
<code>Just Nothing</code> requires special consideration (but like mentioned above, such
constructs are not needed internally by optics).</p>
<h4><a id="allowing-strings-and-integers-as-optics"></a> <a href="#contents"></a> <a href="https://github.com/calmm-js/partial.lenses/blob/master/README.md#allowing-strings-and-integers-as-optics"></a> <a href="#allowing-strings-and-integers-as-optics">Allowing strings and integers as optics</a></h4>
<p>Aside from the brevity, allowing <a href="#l-prop">strings</a> and non-negative
<a href="#l-index">integers</a> to be directly used as optics allows one to avoid
Expand Down

0 comments on commit d0c5f8b

Please sign in to comment.