Skip to content

Commit

Permalink
Merge pull request #309 from davidchambers/derivations
Browse files Browse the repository at this point in the history
readme: update erroneous references to ‘this.of’ in derivations
  • Loading branch information
davidchambers authored Feb 15, 2019
2 parents 2837de1 + eb2714e commit e5c8b5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -810,13 +810,13 @@ to implement certain methods then derive the remaining methods. Derivations:
- [`map`][] may be derived from [`ap`][] and [`of`][]:

```js
function(f) { return this.ap(this.of(f)); }
function(f) { return this.ap(this.constructor.of(f)); }
```

- [`map`][] may be derived from [`chain`][] and [`of`][]:

```js
function(f) { return this.chain(a => this.of(f(a))); }
function(f) { return this.chain(a => this.constructor.of(f(a))); }
```

- [`map`][] may be derived from [`bimap`][]:
Expand Down

0 comments on commit e5c8b5b

Please sign in to comment.