sanctuary-type-classes
Advanced tools
Comparing version 7.2.0 to 8.0.0
{ | ||
"name": "sanctuary-type-classes", | ||
"version": "7.2.0", | ||
"version": "8.0.0", | ||
"description": "Standard library for Fantasy Land", | ||
@@ -19,3 +19,3 @@ "license": "MIT", | ||
"eslint": "4.9.x", | ||
"fantasy-land": "3.4.0", | ||
"fantasy-land": "3.5.0", | ||
"istanbul": "0.4.x", | ||
@@ -22,0 +22,0 @@ "mocha": "2.x.x", |
252
README.md
@@ -21,4 +21,4 @@ # sanctuary-type-classes | ||
<pre> | ||
<a href="#Setoid">Setoid</a> <a href="#Semigroupoid">Semigroupoid</a> <a href="#Semigroup">Semigroup</a> <a href="#Foldable">Foldable</a> <a href="#Functor">Functor</a> <a href="#Contravariant">Contravariant</a> | ||
(<a href="#equals">equals</a>) (<a href="#compose">compose</a>) (<a href="#concat">concat</a>) (<a href="#reduce">reduce</a>) (<a href="#map">map</a>) (<a href="#contramap">contramap</a>) | ||
<a href="#Setoid">Setoid</a> <a href="#Semigroupoid">Semigroupoid</a> <a href="#Semigroup">Semigroup</a> <a href="#Foldable">Foldable</a> <a href="#Functor">Functor</a> <a href="#Contravariant">Contravariant</a> <a href="#Filterable">Filterable</a> | ||
(<a href="#equals">equals</a>) (<a href="#compose">compose</a>) (<a href="#concat">concat</a>) (<a href="#reduce">reduce</a>) (<a href="#map">map</a>) (<a href="#contramap">contramap</a>) (<a href="#filter">filter</a>) | ||
| | | \ / | | | | \ | ||
@@ -57,3 +57,3 @@ | | | \ / | | | | \ | ||
<h4 name="TypeClass"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L135">TypeClass :: (String, String, Array TypeClass, a -> Boolean) -> TypeClass</a></code></h4> | ||
<h4 name="TypeClass"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L135">TypeClass :: (String, String, Array TypeClass, a -> Boolean) -> TypeClass</a></code></h4> | ||
@@ -105,3 +105,3 @@ The arguments are: | ||
<h4 name="Setoid"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L278">Setoid :: TypeClass</a></code></h4> | ||
<h4 name="Setoid"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L278">Setoid :: TypeClass</a></code></h4> | ||
@@ -115,3 +115,3 @@ `TypeClass` value for [Setoid][]. | ||
<h4 name="Ord"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L288">Ord :: TypeClass</a></code></h4> | ||
<h4 name="Ord"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L288">Ord :: TypeClass</a></code></h4> | ||
@@ -128,3 +128,3 @@ `TypeClass` value for [Ord][]. | ||
<h4 name="Semigroupoid"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L301">Semigroupoid :: TypeClass</a></code></h4> | ||
<h4 name="Semigroupoid"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L301">Semigroupoid :: TypeClass</a></code></h4> | ||
@@ -141,3 +141,3 @@ `TypeClass` value for [Semigroupoid][]. | ||
<h4 name="Category"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L314">Category :: TypeClass</a></code></h4> | ||
<h4 name="Category"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L314">Category :: TypeClass</a></code></h4> | ||
@@ -154,3 +154,3 @@ `TypeClass` value for [Category][]. | ||
<h4 name="Semigroup"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L327">Semigroup :: TypeClass</a></code></h4> | ||
<h4 name="Semigroup"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L327">Semigroup :: TypeClass</a></code></h4> | ||
@@ -167,3 +167,3 @@ `TypeClass` value for [Semigroup][]. | ||
<h4 name="Monoid"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L340">Monoid :: TypeClass</a></code></h4> | ||
<h4 name="Monoid"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L340">Monoid :: TypeClass</a></code></h4> | ||
@@ -180,3 +180,3 @@ `TypeClass` value for [Monoid][]. | ||
<h4 name="Group"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L353">Group :: TypeClass</a></code></h4> | ||
<h4 name="Group"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L353">Group :: TypeClass</a></code></h4> | ||
@@ -193,4 +193,16 @@ `TypeClass` value for [Group][]. | ||
<h4 name="Functor"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L366">Functor :: TypeClass</a></code></h4> | ||
<h4 name="Filterable"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L366">Filterable :: TypeClass</a></code></h4> | ||
`TypeClass` value for [Filterable][]. | ||
```javascript | ||
> Filterable.test({}) | ||
true | ||
> Filterable.test('') | ||
false | ||
``` | ||
<h4 name="Functor"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L379">Functor :: TypeClass</a></code></h4> | ||
`TypeClass` value for [Functor][]. | ||
@@ -206,3 +218,3 @@ | ||
<h4 name="Bifunctor"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L379">Bifunctor :: TypeClass</a></code></h4> | ||
<h4 name="Bifunctor"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L392">Bifunctor :: TypeClass</a></code></h4> | ||
@@ -219,3 +231,3 @@ `TypeClass` value for [Bifunctor][]. | ||
<h4 name="Profunctor"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L392">Profunctor :: TypeClass</a></code></h4> | ||
<h4 name="Profunctor"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L405">Profunctor :: TypeClass</a></code></h4> | ||
@@ -232,3 +244,3 @@ `TypeClass` value for [Profunctor][]. | ||
<h4 name="Apply"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L405">Apply :: TypeClass</a></code></h4> | ||
<h4 name="Apply"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L418">Apply :: TypeClass</a></code></h4> | ||
@@ -245,3 +257,3 @@ `TypeClass` value for [Apply][]. | ||
<h4 name="Applicative"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L418">Applicative :: TypeClass</a></code></h4> | ||
<h4 name="Applicative"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L431">Applicative :: TypeClass</a></code></h4> | ||
@@ -258,3 +270,3 @@ `TypeClass` value for [Applicative][]. | ||
<h4 name="Chain"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L431">Chain :: TypeClass</a></code></h4> | ||
<h4 name="Chain"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L444">Chain :: TypeClass</a></code></h4> | ||
@@ -271,3 +283,3 @@ `TypeClass` value for [Chain][]. | ||
<h4 name="ChainRec"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L444">ChainRec :: TypeClass</a></code></h4> | ||
<h4 name="ChainRec"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L457">ChainRec :: TypeClass</a></code></h4> | ||
@@ -284,3 +296,3 @@ `TypeClass` value for [ChainRec][]. | ||
<h4 name="Monad"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L457">Monad :: TypeClass</a></code></h4> | ||
<h4 name="Monad"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L470">Monad :: TypeClass</a></code></h4> | ||
@@ -297,3 +309,3 @@ `TypeClass` value for [Monad][]. | ||
<h4 name="Alt"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L470">Alt :: TypeClass</a></code></h4> | ||
<h4 name="Alt"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L483">Alt :: TypeClass</a></code></h4> | ||
@@ -310,3 +322,3 @@ `TypeClass` value for [Alt][]. | ||
<h4 name="Plus"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L483">Plus :: TypeClass</a></code></h4> | ||
<h4 name="Plus"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L496">Plus :: TypeClass</a></code></h4> | ||
@@ -323,3 +335,3 @@ `TypeClass` value for [Plus][]. | ||
<h4 name="Alternative"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L496">Alternative :: TypeClass</a></code></h4> | ||
<h4 name="Alternative"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L509">Alternative :: TypeClass</a></code></h4> | ||
@@ -336,3 +348,3 @@ `TypeClass` value for [Alternative][]. | ||
<h4 name="Foldable"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L509">Foldable :: TypeClass</a></code></h4> | ||
<h4 name="Foldable"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L522">Foldable :: TypeClass</a></code></h4> | ||
@@ -349,3 +361,3 @@ `TypeClass` value for [Foldable][]. | ||
<h4 name="Traversable"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L522">Traversable :: TypeClass</a></code></h4> | ||
<h4 name="Traversable"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L535">Traversable :: TypeClass</a></code></h4> | ||
@@ -362,3 +374,3 @@ `TypeClass` value for [Traversable][]. | ||
<h4 name="Extend"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L535">Extend :: TypeClass</a></code></h4> | ||
<h4 name="Extend"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L548">Extend :: TypeClass</a></code></h4> | ||
@@ -375,3 +387,3 @@ `TypeClass` value for [Extend][]. | ||
<h4 name="Comonad"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L548">Comonad :: TypeClass</a></code></h4> | ||
<h4 name="Comonad"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L561">Comonad :: TypeClass</a></code></h4> | ||
@@ -388,3 +400,3 @@ `TypeClass` value for [Comonad][]. | ||
<h4 name="Contravariant"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L561">Contravariant :: TypeClass</a></code></h4> | ||
<h4 name="Contravariant"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L574">Contravariant :: TypeClass</a></code></h4> | ||
@@ -401,3 +413,3 @@ `TypeClass` value for [Contravariant][]. | ||
<h4 name="toString"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1128">toString :: a -> String</a></code></h4> | ||
<h4 name="toString"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1155">toString :: a -> String</a></code></h4> | ||
@@ -428,3 +440,3 @@ Returns a useful string representation of its argument. | ||
<h4 name="equals"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1176">equals :: (a, b) -> Boolean</a></code></h4> | ||
<h4 name="equals"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1203">equals :: (a, b) -> Boolean</a></code></h4> | ||
@@ -458,3 +470,3 @@ Returns `true` if its arguments are of the same type and equal according | ||
<h4 name="lt"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1226">lt :: (a, b) -> Boolean</a></code></h4> | ||
<h4 name="lt"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1253">lt :: (a, b) -> Boolean</a></code></h4> | ||
@@ -480,3 +492,3 @@ Returns `true` if its arguments are of the same type and the first is | ||
<h4 name="lte"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1250">lte :: (a, b) -> Boolean</a></code></h4> | ||
<h4 name="lte"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1277">lte :: (a, b) -> Boolean</a></code></h4> | ||
@@ -507,3 +519,3 @@ Returns `true` if its arguments are of the same type and the first | ||
<h4 name="gt"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1297">gt :: (a, b) -> Boolean</a></code></h4> | ||
<h4 name="gt"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1324">gt :: (a, b) -> Boolean</a></code></h4> | ||
@@ -529,3 +541,3 @@ Returns `true` if its arguments are of the same type and the first is | ||
<h4 name="gte"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1321">gte :: (a, b) -> Boolean</a></code></h4> | ||
<h4 name="gte"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1348">gte :: (a, b) -> Boolean</a></code></h4> | ||
@@ -551,3 +563,3 @@ Returns `true` if its arguments are of the same type and the first | ||
<h4 name="min"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1345">min :: Ord a => (a, a) -> a</a></code></h4> | ||
<h4 name="min"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1372">min :: Ord a => (a, a) -> a</a></code></h4> | ||
@@ -571,3 +583,3 @@ Returns the smaller of its two arguments. | ||
<h4 name="max"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1367">max :: Ord a => (a, a) -> a</a></code></h4> | ||
<h4 name="max"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1394">max :: Ord a => (a, a) -> a</a></code></h4> | ||
@@ -591,3 +603,3 @@ Returns the larger of its two arguments. | ||
<h4 name="compose"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1389">compose :: Semigroupoid c => (c j k, c i j) -> c i k</a></code></h4> | ||
<h4 name="compose"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1416">compose :: Semigroupoid c => (c j k, c i j) -> c i k</a></code></h4> | ||
@@ -604,3 +616,3 @@ Function wrapper for [`fantasy-land/compose`][]. | ||
<h4 name="id"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1404">id :: Category c => TypeRep c -> c</a></code></h4> | ||
<h4 name="id"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1431">id :: Category c => TypeRep c -> c</a></code></h4> | ||
@@ -617,3 +629,3 @@ Function wrapper for [`fantasy-land/id`][]. | ||
<h4 name="concat"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1419">concat :: Semigroup a => (a, a) -> a</a></code></h4> | ||
<h4 name="concat"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1446">concat :: Semigroup a => (a, a) -> a</a></code></h4> | ||
@@ -639,3 +651,3 @@ Function wrapper for [`fantasy-land/concat`][]. | ||
<h4 name="empty"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1443">empty :: Monoid m => TypeRep m -> m</a></code></h4> | ||
<h4 name="empty"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1470">empty :: Monoid m => TypeRep m -> m</a></code></h4> | ||
@@ -661,3 +673,3 @@ Function wrapper for [`fantasy-land/empty`][]. | ||
<h4 name="invert"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1467">invert :: Group g => g -> g</a></code></h4> | ||
<h4 name="invert"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1494">invert :: Group g => g -> g</a></code></h4> | ||
@@ -671,4 +683,61 @@ Function wrapper for [`fantasy-land/invert`][]. | ||
<h4 name="map"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1479">map :: Functor f => (a -> b, f a) -> f b</a></code></h4> | ||
<h4 name="filter"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1506">filter :: Filterable f => (a -> Boolean, f a) -> f a</a></code></h4> | ||
Function wrapper for [`fantasy-land/filter`][]. Discards every element | ||
of the given structure which does not satisfy the predicate. | ||
`fantasy-land/filter` implementations are provided for the following | ||
built-in types: Array and Object. | ||
See also [`reject`](#reject). | ||
```javascript | ||
> filter(x => x % 2 == 1, [1, 2, 3]) | ||
[1, 3] | ||
> filter(x => x % 2 == 1, {x: 1, y: 2, z: 3}) | ||
{x: 1, z: 3} | ||
> filter(x => x % 2 == 1, Cons(1, Cons(2, Cons(3, Nil)))) | ||
Cons(1, Cons(3, Nil)) | ||
> filter(x => x % 2 == 1, Nothing) | ||
Nothing | ||
> filter(x => x % 2 == 1, Just(0)) | ||
Nothing | ||
> filter(x => x % 2 == 1, Just(1)) | ||
Just(1) | ||
``` | ||
<h4 name="reject"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1539">reject :: Filterable f => (a -> Boolean, f a) -> f a</a></code></h4> | ||
Discards every element of the given structure which satisfies the | ||
predicate. | ||
This function is derived from [`filter`](#filter). | ||
```javascript | ||
> reject(x => x % 2 == 1, [1, 2, 3]) | ||
[2] | ||
> reject(x => x % 2 == 1, {x: 1, y: 2, z: 3}) | ||
{y: 2} | ||
> reject(x => x % 2 == 1, Cons(1, Cons(2, Cons(3, Nil)))) | ||
Cons(2, Nil) | ||
> reject(x => x % 2 == 1, Nothing) | ||
Nothing | ||
> reject(x => x % 2 == 1, Just(0)) | ||
Just(0) | ||
> reject(x => x % 2 == 1, Just(1)) | ||
Nothing | ||
``` | ||
<h4 name="map"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1569">map :: Functor f => (a -> b, f a) -> f b</a></code></h4> | ||
Function wrapper for [`fantasy-land/map`][]. | ||
@@ -699,3 +768,3 @@ | ||
<h4 name="bimap"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1509">bimap :: Bifunctor f => (a -> b, c -> d, f a c) -> f b d</a></code></h4> | ||
<h4 name="bimap"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1599">bimap :: Bifunctor f => (a -> b, c -> d, f a c) -> f b d</a></code></h4> | ||
@@ -709,3 +778,3 @@ Function wrapper for [`fantasy-land/bimap`][]. | ||
<h4 name="promap"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1521">promap :: Profunctor p => (a -> b, c -> d, p b c) -> p a d</a></code></h4> | ||
<h4 name="promap"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1611">promap :: Profunctor p => (a -> b, c -> d, p b c) -> p a d</a></code></h4> | ||
@@ -722,3 +791,3 @@ Function wrapper for [`fantasy-land/promap`][]. | ||
<h4 name="ap"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1536">ap :: Apply f => (f (a -> b), f a) -> f b</a></code></h4> | ||
<h4 name="ap"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1626">ap :: Apply f => (f (a -> b), f a) -> f b</a></code></h4> | ||
@@ -747,3 +816,3 @@ Function wrapper for [`fantasy-land/ap`][]. | ||
<h4 name="lift2"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1563">lift2 :: Apply f => (a -> b -> c, f a, f b) -> f c</a></code></h4> | ||
<h4 name="lift2"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1653">lift2 :: Apply f => (a -> b -> c, f a, f b) -> f c</a></code></h4> | ||
@@ -765,3 +834,3 @@ Lifts `a -> b -> c` to `Apply f => f a -> f b -> f c` and returns the | ||
<h4 name="lift3"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1583">lift3 :: Apply f => (a -> b -> c -> d, f a, f b, f c) -> f d</a></code></h4> | ||
<h4 name="lift3"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1673">lift3 :: Apply f => (a -> b -> c -> d, f a, f b, f c) -> f d</a></code></h4> | ||
@@ -783,3 +852,3 @@ Lifts `a -> b -> c -> d` to `Apply f => f a -> f b -> f c -> f d` and | ||
<h4 name="apFirst"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1603">apFirst :: Apply f => (f a, f b) -> f a</a></code></h4> | ||
<h4 name="apFirst"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1693">apFirst :: Apply f => (f a, f b) -> f a</a></code></h4> | ||
@@ -801,3 +870,3 @@ Combines two effectful actions, keeping only the result of the first. | ||
<h4 name="apSecond"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1623">apSecond :: Apply f => (f a, f b) -> f b</a></code></h4> | ||
<h4 name="apSecond"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1713">apSecond :: Apply f => (f a, f b) -> f b</a></code></h4> | ||
@@ -819,3 +888,3 @@ Combines two effectful actions, keeping only the result of the second. | ||
<h4 name="of"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1643">of :: Applicative f => (TypeRep f, a) -> f a</a></code></h4> | ||
<h4 name="of"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1733">of :: Applicative f => (TypeRep f, a) -> f a</a></code></h4> | ||
@@ -838,3 +907,3 @@ Function wrapper for [`fantasy-land/of`][]. | ||
<h4 name="append"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1664">append :: (Applicative f, Semigroup (f a)) => (a, f a) -> f a</a></code></h4> | ||
<h4 name="append"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1754">append :: (Applicative f, Semigroup (f a)) => (a, f a) -> f a</a></code></h4> | ||
@@ -855,3 +924,3 @@ Returns the result of appending the first argument to the second. | ||
<h4 name="prepend"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1683">prepend :: (Applicative f, Semigroup (f a)) => (a, f a) -> f a</a></code></h4> | ||
<h4 name="prepend"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1773">prepend :: (Applicative f, Semigroup (f a)) => (a, f a) -> f a</a></code></h4> | ||
@@ -872,3 +941,3 @@ Returns the result of prepending the first argument to the second. | ||
<h4 name="chain"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1702">chain :: Chain m => (a -> m b, m a) -> m b</a></code></h4> | ||
<h4 name="chain"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1792">chain :: Chain m => (a -> m b, m a) -> m b</a></code></h4> | ||
@@ -891,3 +960,3 @@ Function wrapper for [`fantasy-land/chain`][]. | ||
<h4 name="join"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1723">join :: Chain m => m (m a) -> m a</a></code></h4> | ||
<h4 name="join"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1813">join :: Chain m => m (m a) -> m a</a></code></h4> | ||
@@ -909,3 +978,3 @@ Removes one level of nesting from a nested monadic structure. | ||
<h4 name="chainRec"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1743">chainRec :: ChainRec m => (TypeRep m, (a -> c, b -> c, a) -> m c, a) -> m b</a></code></h4> | ||
<h4 name="chainRec"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1833">chainRec :: ChainRec m => (TypeRep m, (a -> c, b -> c, a) -> m c, a) -> m b</a></code></h4> | ||
@@ -927,47 +996,4 @@ Function wrapper for [`fantasy-land/chainRec`][]. | ||
<h4 name="filter"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1763">filter :: (Applicative f, Foldable f, Monoid (f a)) => (a -> Boolean, f a) -> f a</a></code></h4> | ||
<h4 name="alt"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1853">alt :: Alt f => (f a, f a) -> f a</a></code></h4> | ||
Filters its second argument in accordance with the given predicate. | ||
This function is derived from [`concat`](#concat), [`empty`](#empty), | ||
[`of`](#of), and [`reduce`](#reduce). | ||
See also [`filterM`](#filterM). | ||
```javascript | ||
> filter(x => x % 2 == 1, [1, 2, 3]) | ||
[1, 3] | ||
> filter(x => x % 2 == 1, Cons(1, Cons(2, Cons(3, Nil)))) | ||
Cons(1, Cons(3, Nil)) | ||
``` | ||
<h4 name="filterM"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1788">filterM :: (Alternative m, Monad m) => (a -> Boolean, m a) -> m a</a></code></h4> | ||
Filters its second argument in accordance with the given predicate. | ||
This function is derived from [`of`](#of), [`chain`](#chain), and | ||
[`zero`](#zero). | ||
See also [`filter`](#filter). | ||
```javascript | ||
> filterM(x => x % 2 == 1, [1, 2, 3]) | ||
[1, 3] | ||
> filterM(x => x % 2 == 1, Cons(1, Cons(2, Cons(3, Nil)))) | ||
Cons(1, Cons(3, Nil)) | ||
> filterM(x => x % 2 == 1, Nothing) | ||
Nothing | ||
> filterM(x => x % 2 == 1, Just(0)) | ||
Nothing | ||
> filterM(x => x % 2 == 1, Just(1)) | ||
Just(1) | ||
``` | ||
<h4 name="alt"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1819">alt :: Alt f => (f a, f a) -> f a</a></code></h4> | ||
Function wrapper for [`fantasy-land/alt`][]. | ||
@@ -992,3 +1018,3 @@ | ||
<h4 name="zero"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1843">zero :: Plus f => TypeRep f -> f a</a></code></h4> | ||
<h4 name="zero"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1877">zero :: Plus f => TypeRep f -> f a</a></code></h4> | ||
@@ -1011,3 +1037,3 @@ Function wrapper for [`fantasy-land/zero`][]. | ||
<h4 name="reduce"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1864">reduce :: Foldable f => ((b, a) -> b, b, f a) -> b</a></code></h4> | ||
<h4 name="reduce"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1898">reduce :: Foldable f => ((b, a) -> b, b, f a) -> b</a></code></h4> | ||
@@ -1027,3 +1053,3 @@ Function wrapper for [`fantasy-land/reduce`][]. | ||
<h4 name="size"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1882">size :: Foldable f => f a -> Integer</a></code></h4> | ||
<h4 name="size"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1916">size :: Foldable f => f a -> Integer</a></code></h4> | ||
@@ -1048,3 +1074,3 @@ Returns the number of elements of the given structure. | ||
<h4 name="elem"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1907">elem :: (Setoid a, Foldable f) => (a, f a) -> Boolean</a></code></h4> | ||
<h4 name="elem"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1941">elem :: (Setoid a, Foldable f) => (a, f a) -> Boolean</a></code></h4> | ||
@@ -1080,3 +1106,3 @@ Takes a value and a structure and returns `true` if the | ||
<h4 name="reverse"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1943">reverse :: (Applicative f, Foldable f, Monoid (f a)) => f a -> f a</a></code></h4> | ||
<h4 name="reverse"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L1977">reverse :: (Applicative f, Foldable f, Monoid (f a)) => f a -> f a</a></code></h4> | ||
@@ -1096,3 +1122,3 @@ Reverses the elements of the given structure. | ||
<h4 name="sort"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1966">sort :: (Ord a, Applicative f, Foldable f, Monoid (f a)) => f a -> f a</a></code></h4> | ||
<h4 name="sort"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L2000">sort :: (Ord a, Applicative f, Foldable f, Monoid (f a)) => f a -> f a</a></code></h4> | ||
@@ -1118,3 +1144,3 @@ Performs a [stable sort][] of the elements of the given structure, | ||
<h4 name="sortBy"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L1990">sortBy :: (Ord b, Applicative f, Foldable f, Monoid (f a)) => (a -> b, f a) -> f a</a></code></h4> | ||
<h4 name="sortBy"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L2024">sortBy :: (Ord b, Applicative f, Foldable f, Monoid (f a)) => (a -> b, f a) -> f a</a></code></h4> | ||
@@ -1144,3 +1170,3 @@ Performs a [stable sort][] of the elements of the given structure, | ||
<h4 name="takeWhile"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L2035">takeWhile :: (Applicative f, Foldable f, Monoid (f a)) => (a -> Boolean, f a) -> f a</a></code></h4> | ||
<h4 name="takeWhile"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L2069">takeWhile :: (Applicative f, Foldable f, Monoid (f a)) => (a -> Boolean, f a) -> f a</a></code></h4> | ||
@@ -1166,3 +1192,3 @@ Discards the first inner value which does not satisfy the predicate, and | ||
<h4 name="dropWhile"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L2060">dropWhile :: (Applicative f, Foldable f, Monoid (f a)) => (a -> Boolean, f a) -> f a</a></code></h4> | ||
<h4 name="dropWhile"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L2094">dropWhile :: (Applicative f, Foldable f, Monoid (f a)) => (a -> Boolean, f a) -> f a</a></code></h4> | ||
@@ -1188,3 +1214,3 @@ Retains the first inner value which does not satisfy the predicate, and | ||
<h4 name="traverse"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L2085">traverse :: (Applicative f, Traversable t) => (TypeRep f, a -> f b, t a) -> f (t b)</a></code></h4> | ||
<h4 name="traverse"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L2119">traverse :: (Applicative f, Traversable t) => (TypeRep f, a -> f b, t a) -> f (t b)</a></code></h4> | ||
@@ -1206,3 +1232,3 @@ Function wrapper for [`fantasy-land/traverse`][]. | ||
<h4 name="sequence"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L2105">sequence :: (Applicative f, Traversable t) => (TypeRep f, t (f a)) -> f (t a)</a></code></h4> | ||
<h4 name="sequence"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L2139">sequence :: (Applicative f, Traversable t) => (TypeRep f, t (f a)) -> f (t a)</a></code></h4> | ||
@@ -1221,3 +1247,3 @@ Inverts the given `t (f a)` to produce an `f (t a)`. | ||
<h4 name="extend"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L2122">extend :: Extend w => (w a -> b, w a) -> w b</a></code></h4> | ||
<h4 name="extend"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L2156">extend :: Extend w => (w a -> b, w a) -> w b</a></code></h4> | ||
@@ -1237,3 +1263,3 @@ Function wrapper for [`fantasy-land/extend`][]. | ||
<h4 name="duplicate"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L2140">duplicate :: Extend w => w a -> w (w a)</a></code></h4> | ||
<h4 name="duplicate"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L2174">duplicate :: Extend w => w a -> w (w a)</a></code></h4> | ||
@@ -1258,3 +1284,3 @@ Adds one level of nesting to a comonadic structure. | ||
<h4 name="extract"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L2163">extract :: Comonad w => w a -> a</a></code></h4> | ||
<h4 name="extract"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L2197">extract :: Comonad w => w a -> a</a></code></h4> | ||
@@ -1268,3 +1294,3 @@ Function wrapper for [`fantasy-land/extract`][]. | ||
<h4 name="contramap"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v7.2.0/index.js#L2175">contramap :: Contravariant f => (b -> a, f a) -> f b</a></code></h4> | ||
<h4 name="contramap"><code><a href="https://github.com/sanctuary-js/sanctuary-type-classes/blob/v8.0.0/index.js#L2209">contramap :: Contravariant f => (b -> a, f a) -> f b</a></code></h4> | ||
@@ -1293,2 +1319,3 @@ Function wrapper for [`fantasy-land/contramap`][]. | ||
[FL]: https://github.com/fantasyland/fantasy-land | ||
[Filterable]: https://github.com/fantasyland/fantasy-land#filterable | ||
[Foldable]: https://github.com/fantasyland/fantasy-land#foldable | ||
@@ -1318,2 +1345,3 @@ [Functor]: https://github.com/fantasyland/fantasy-land#functor | ||
[`fantasy-land/extract`]: https://github.com/fantasyland/fantasy-land#extract-method | ||
[`fantasy-land/filter`]: https://github.com/fantasyland/fantasy-land#filter-method | ||
[`fantasy-land/id`]: https://github.com/fantasyland/fantasy-land#id-method | ||
@@ -1320,0 +1348,0 @@ [`fantasy-land/invert`]: https://github.com/fantasyland/fantasy-land#invert-method |
Sorry, the diff of this file is too big to display
111667
2168
1288