Skip to content

Commit c4bfe0b

Browse files
committed
Version 1.2.0
1 parent 396597f commit c4bfe0b

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ value is of type `b`.
1515
. (Z[k].test (Right (Useless)) ? '\u2705 ' :
1616
. Z[k].test (Right (['foo'])) ? '\u2705 * ' :
1717
. /* otherwise */ '\u274C '))
18-
. (S.keys (Z.filter ($.test ([]) ($.TypeClass), Z)))
18+
. (S.keys (S.unchecked.filter (S.is ($.TypeClass)) (Z)))
1919
[ 'Setoid ✅ * ', // if ‘a’ and ‘b’ satisfy Setoid
2020
. 'Ord ✅ * ', // if ‘a’ and ‘b’ satisfy Ord
2121
. 'Semigroupoid ❌ ',
@@ -42,11 +42,11 @@ value is of type `b`.
4242
. 'Contravariant ❌ ' ]
4343
```
4444

45-
#### <a name="Either" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.1.0/index.js#L138">`Either :: TypeRep Either`</a>
45+
#### <a name="Either" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.2.0/index.js#L144">`Either :: TypeRep Either`</a>
4646

4747
Either [type representative][].
4848

49-
#### <a name="Either.Left" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.1.0/index.js#L142">`Either.Left :: a -⁠> Either a b`</a>
49+
#### <a name="Either.Left" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.2.0/index.js#L148">`Either.Left :: a -⁠> Either a b`</a>
5050

5151
Constructs a value of type `Either a b` from a value of type `a`.
5252

@@ -55,7 +55,7 @@ Constructs a value of type `Either a b` from a value of type `a`.
5555
Left ('sqrt undefined for -1')
5656
```
5757

58-
#### <a name="Either.Right" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.1.0/index.js#L165">`Either.Right :: b -⁠> Either a b`</a>
58+
#### <a name="Either.Right" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.2.0/index.js#L171">`Either.Right :: b -⁠> Either a b`</a>
5959

6060
Constructs a value of type `Either a b` from a value of type `b`.
6161

@@ -64,7 +64,7 @@ Constructs a value of type `Either a b` from a value of type `b`.
6464
Right (42)
6565
```
6666

67-
#### <a name="Either.@@type" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.1.0/index.js#L188">`Either.@@type :: String`</a>
67+
#### <a name="Either.@@type" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.2.0/index.js#L194">`Either.@@type :: String`</a>
6868

6969
Either [type identifier][].
7070

@@ -76,7 +76,7 @@ Either [type identifier][].
7676
{namespace: 'sanctuary-either', name: 'Either', version: 1}
7777
```
7878

79-
#### <a name="Either.fantasy-land/of" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.1.0/index.js#L201">`Either.fantasy-land/of :: b -⁠> Either a b`</a>
79+
#### <a name="Either.fantasy-land/of" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.2.0/index.js#L207">`Either.fantasy-land/of :: b -⁠> Either a b`</a>
8080

8181
- `of (Either) (x)` is equivalent to `Right (x)`
8282

@@ -85,7 +85,7 @@ Either [type identifier][].
8585
Right (42)
8686
```
8787

88-
#### <a name="Either.fantasy-land/chainRec" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.1.0/index.js#L214">`Either.fantasy-land/chainRec :: ((a -⁠> c, b -⁠> c, a) -⁠> Either d c, a) -⁠> Either d b`</a>
88+
#### <a name="Either.fantasy-land/chainRec" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.2.0/index.js#L220">`Either.fantasy-land/chainRec :: ((a -⁠> c, b -⁠> c, a) -⁠> Either d c, a) -⁠> Either d b`</a>
8989

9090
```javascript
9191
> Z.chainRec (
@@ -105,7 +105,7 @@ Left ('!!')
105105
Right (65536)
106106
```
107107

108-
#### <a name="Either.prototype.@@show" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.1.0/index.js#L243">`Either#@@show :: (Showable a, Showable b) => Either a b ~> () -⁠> String`</a>
108+
#### <a name="Either.prototype.@@show" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.2.0/index.js#L249">`Either#@@show :: (Showable a, Showable b) => Either a b ~> () -⁠> String`</a>
109109

110110
- `show (Left (x))` is equivalent to `'Left (' + show (x) + ')'`
111111
- `show (Right (x))` is equivalent to `'Right (' + show (x) + ')'`
@@ -118,7 +118,7 @@ Right (65536)
118118
'Right ([1, 2, 3])'
119119
```
120120

121-
#### <a name="Either.prototype.fantasy-land/equals" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.1.0/index.js#L262">`Either#fantasy-land/equals :: (Setoid a, Setoid b) => Either a b ~> Either a b -⁠> Boolean`</a>
121+
#### <a name="Either.prototype.fantasy-land/equals" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.2.0/index.js#L268">`Either#fantasy-land/equals :: (Setoid a, Setoid b) => Either a b ~> Either a b -⁠> Boolean`</a>
122122

123123
- `Left (x)` is equal to `Left (y)` [iff][] `x` is equal to `y`
124124
according to [`Z.equals`][]
@@ -137,7 +137,7 @@ true
137137
false
138138
```
139139

140-
#### <a name="Either.prototype.fantasy-land/lte" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.1.0/index.js#L287">`Either#fantasy-land/lte :: (Ord a, Ord b) => Either a b ~> Either a b -⁠> Boolean`</a>
140+
#### <a name="Either.prototype.fantasy-land/lte" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.2.0/index.js#L293">`Either#fantasy-land/lte :: (Ord a, Ord b) => Either a b ~> Either a b -⁠> Boolean`</a>
141141

142142
- `Left (x)` is less than or equal to `Left (y)` [iff][] `x` is less
143143
than or equal to `y` according to [`Z.lte`][]
@@ -159,7 +159,7 @@ false
159159
[Left (0), Left (1), Left (2)]
160160
```
161161

162-
#### <a name="Either.prototype.fantasy-land/concat" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.1.0/index.js#L315">`Either#fantasy-land/concat :: (Semigroup a, Semigroup b) => Either a b ~> Either a b -⁠> Either a b`</a>
162+
#### <a name="Either.prototype.fantasy-land/concat" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.2.0/index.js#L321">`Either#fantasy-land/concat :: (Semigroup a, Semigroup b) => Either a b ~> Either a b -⁠> Either a b`</a>
163163

164164
- `concat (Left (x)) (Left (y))` is equivalent to
165165
`Left (concat (x) (y))`
@@ -182,7 +182,7 @@ Right ([1, 2, 3])
182182
Right ([1, 2, 3])
183183
```
184184

185-
#### <a name="Either.prototype.fantasy-land/map" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.1.0/index.js#L344">`Either#fantasy-land/map :: Either a b ~> (b -⁠> c) -⁠> Either a c`</a>
185+
#### <a name="Either.prototype.fantasy-land/map" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.2.0/index.js#L350">`Either#fantasy-land/map :: Either a b ~> (b -⁠> c) -⁠> Either a c`</a>
186186

187187
- `map (f) (Left (x))` is equivalent to `Left (x)`
188188
- `map (f) (Right (x))` is equivalent to `Right (f (x))`
@@ -195,7 +195,7 @@ Left ('sqrt undefined for -1')
195195
Right (100)
196196
```
197197

198-
#### <a name="Either.prototype.fantasy-land/bimap" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.1.0/index.js#L363">`Either#fantasy-land/bimap :: Either a c ~> (a -⁠> b, c -⁠> d) -⁠> Either b d`</a>
198+
#### <a name="Either.prototype.fantasy-land/bimap" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.2.0/index.js#L369">`Either#fantasy-land/bimap :: Either a c ~> (a -⁠> b, c -⁠> d) -⁠> Either b d`</a>
199199

200200
- `bimap (f) (g) (Left (x))` is equivalent to `Left (f (x))`
201201
- `bimap (f) (g) (Right (x))` is equivalent to `Right (g (x))`
@@ -208,7 +208,7 @@ Left ('ABC')
208208
Right (100)
209209
```
210210

211-
#### <a name="Either.prototype.fantasy-land/ap" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.1.0/index.js#L382">`Either#fantasy-land/ap :: Either a b ~> Either a (b -⁠> c) -⁠> Either a c`</a>
211+
#### <a name="Either.prototype.fantasy-land/ap" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.2.0/index.js#L388">`Either#fantasy-land/ap :: Either a b ~> Either a (b -⁠> c) -⁠> Either a c`</a>
212212

213213
- `ap (Left (x)) (Left (y))` is equivalent to `Left (x)`
214214
- `ap (Left (x)) (Right (y))` is equivalent to `Left (x)`
@@ -229,7 +229,7 @@ Left ('sqrt undefined for -1')
229229
Right (100)
230230
```
231231

232-
#### <a name="Either.prototype.fantasy-land/chain" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.1.0/index.js#L409">`Either#fantasy-land/chain :: Either a b ~> (b -⁠> Either a c) -⁠> Either a c`</a>
232+
#### <a name="Either.prototype.fantasy-land/chain" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.2.0/index.js#L415">`Either#fantasy-land/chain :: Either a b ~> (b -⁠> Either a c) -⁠> Either a c`</a>
233233

234234
- `chain (f) (Left (x))` is equivalent to `Left (x)`
235235
- `chain (f) (Right (x))` is equivalent to `f (x)`
@@ -248,7 +248,7 @@ Left ('sqrt undefined for -1')
248248
Right (5)
249249
```
250250

251-
#### <a name="Either.prototype.fantasy-land/alt" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.1.0/index.js#L434">`Either#fantasy-land/alt :: Either a b ~> Either a b -⁠> Either a b`</a>
251+
#### <a name="Either.prototype.fantasy-land/alt" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.2.0/index.js#L440">`Either#fantasy-land/alt :: Either a b ~> Either a b -⁠> Either a b`</a>
252252

253253
- `alt (Left (x)) (Left (y))` is equivalent to `Left (y)`
254254
- `alt (Left (x)) (Right (y))` is equivalent to `Right (y)`
@@ -269,7 +269,7 @@ Right (2)
269269
Right (3)
270270
```
271271

272-
#### <a name="Either.prototype.fantasy-land/reduce" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.1.0/index.js#L461">`Either#fantasy-land/reduce :: Either a b ~> ((c, b) -⁠> c, c) -⁠> c`</a>
272+
#### <a name="Either.prototype.fantasy-land/reduce" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.2.0/index.js#L467">`Either#fantasy-land/reduce :: Either a b ~> ((c, b) -⁠> c, c) -⁠> c`</a>
273273

274274
- `reduce (f) (x) (Left (y))` is equivalent to `x`
275275
- `reduce (f) (x) (Right (y))` is equivalent to `f (x) (y)`
@@ -282,7 +282,7 @@ Right (3)
282282
[1, 2]
283283
```
284284

285-
#### <a name="Either.prototype.fantasy-land/traverse" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.1.0/index.js#L480">`Either#fantasy-land/traverse :: Applicative f => Either a b ~> (TypeRep f, b -⁠> f c) -⁠> f (Either a c)`</a>
285+
#### <a name="Either.prototype.fantasy-land/traverse" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.2.0/index.js#L486">`Either#fantasy-land/traverse :: Applicative f => Either a b ~> (TypeRep f, b -⁠> f c) -⁠> f (Either a c)`</a>
286286

287287
- `traverse (A) (f) (Left (x))` is equivalent to `of (A) (Left (x))`
288288
- `traverse (A) (f) (Right (x))` is equivalent to `map (Right) (f (x))`
@@ -295,7 +295,7 @@ Right (3)
295295
[Right ('foo'), Right ('bar'), Right ('baz')]
296296
```
297297

298-
#### <a name="Either.prototype.fantasy-land/extend" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.1.0/index.js#L499">`Either#fantasy-land/extend :: Either a b ~> (Either a b -⁠> c) -⁠> Either a c`</a>
298+
#### <a name="Either.prototype.fantasy-land/extend" href="https://github.com/sanctuary-js/sanctuary-either/blob/v1.2.0/index.js#L505">`Either#fantasy-land/extend :: Either a b ~> (Either a b -⁠> c) -⁠> Either a c`</a>
299299

300300
- `extend (f) (Left (x))` is equivalent to `Left (x)`
301301
- `extend (f) (Right (x))` is equivalent to `Right (f (Right (x)))`
@@ -308,9 +308,9 @@ Left ('sqrt undefined for -1')
308308
Right (100)
309309
```
310310

311-
[Fantasy Land]: https://github.com/fantasyland/fantasy-land/tree/v3.5.0
312-
[`Z.equals`]: https://github.com/sanctuary-js/sanctuary-type-classes/tree/v10.0.0#equals
313-
[`Z.lte`]: https://github.com/sanctuary-js/sanctuary-type-classes/tree/v10.0.0#lte
311+
[Fantasy Land]: https://github.com/fantasyland/fantasy-land/tree/v4.0.1
312+
[`Z.equals`]: https://github.com/sanctuary-js/sanctuary-type-classes/tree/v11.0.0#equals
313+
[`Z.lte`]: https://github.com/sanctuary-js/sanctuary-type-classes/tree/v11.0.0#lte
314314
[iff]: https://en.wikipedia.org/wiki/If_and_only_if
315315
[type identifier]: https://github.com/sanctuary-js/sanctuary-type-identifiers/tree/v2.0.1
316-
[type representative]: https://github.com/fantasyland/fantasy-land/tree/v3.5.0#type-representatives
316+
[type representative]: https://github.com/fantasyland/fantasy-land/tree/v4.0.1#type-representatives

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sanctuary-either",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"description": "Fantasy Land -compliant Either type",
55
"license": "MIT",
66
"repository": {

0 commit comments

Comments
 (0)