We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12c2a36 commit 5acafe9Copy full SHA for 5acafe9
1 file changed
src/either.js
@@ -11,7 +11,7 @@ class Left extends Either {
11
this.isRight = false
12
// ----- Functor (Either a)
13
this.map = () => this
14
- this.join = () => this
+ this.join = this.map
15
}
16
// ----- Applicative (Either a)
17
// ap() { return this }
@@ -31,7 +31,7 @@ class Right extends Either {
31
this.isRight = true
32
33
this.map = fn => Either.of(fn(x))
34
- this.join = () => this._
+ this.join = () => x
35
36
37
// ap(f) { return f.map(this._) }
0 commit comments