From d857ea959842c083616e6a9c31b9e9592635e18a Mon Sep 17 00:00:00 2001 From: bsanches Date: Thu, 9 Jun 2016 20:40:18 -0700 Subject: [PATCH] use method shorthand for comonad example --- readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index affb88c..eca8af8 100644 --- a/readme.md +++ b/readme.md @@ -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)) } }) ```