use method shorthand for comonad example

This commit is contained in:
bsanches 2016-06-09 20:40:18 -07:00
parent 6ce00b53a5
commit d857ea9598

View file

@ -439,10 +439,10 @@ compose(foo, identity) ≍ compose(identity, foo) ≍ foo
> An object that has `extract` and `extend` functions.
```js
let CoIdentity = v => ({
const CoIdentity = v => ({
val: v,
extract: function () { return this.val },
extend: function (f) { return CoIdentity(f(this)) }
extract() { return this.val },
extend(f) { return CoIdentity(f(this)) }
})
```