{"action":"created","issue":{"url":"https://api.github.com/repos/fantasyland/fantasy-land/issues/209","repository_url":"https://api.github.com/repos/fantasyland/fantasy-land","labels_url":"https://api.github.com/repos/fantasyland/fantasy-land/issues/209/labels{/name}","comments_url":"https://api.github.com/repos/fantasyland/fantasy-land/issues/209/comments","events_url":"https://api.github.com/repos/fantasyland/fantasy-land/issues/209/events","html_url":"https://github.com/fantasyland/fantasy-land/issues/209","id":194995003,"number":209,"title":"Apply composition law does not equate","user":{"login":"jlmorgan","id":956764,"avatar_url":"https://avatars.githubusercontent.com/u/956764?v=3","gravatar_id":"","url":"https://api.github.com/users/jlmorgan","html_url":"https://github.com/jlmorgan","followers_url":"https://api.github.com/users/jlmorgan/followers","following_url":"https://api.github.com/users/jlmorgan/following{/other_user}","gists_url":"https://api.github.com/users/jlmorgan/gists{/gist_id}","starred_url":"https://api.github.com/users/jlmorgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlmorgan/subscriptions","organizations_url":"https://api.github.com/users/jlmorgan/orgs","repos_url":"https://api.github.com/users/jlmorgan/repos","events_url":"https://api.github.com/users/jlmorgan/events{/privacy}","received_events_url":"https://api.github.com/users/jlmorgan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-12-12T14:57:48Z","updated_at":"2016-12-12T21:32:51Z","closed_at":null,"body":"It could be that my implementation is not correct, but here's the result of the test.\r\n\r\n### test.js\r\n\r\n```javascript\r\n\"use strict\";\r\n\r\nclass Thing {\r\n  constructor(value) {\r\n    this.value = value;\r\n  }\r\n  ap(other) { return other.map(this.value); }\r\n  map(f) { return new Thing(f(this.value)); }\r\n}\r\n\r\nconst y = new Thing(x => x);\r\nconst left = y.ap(y.ap(y.map(f => g => x => f(g(x)))));\r\nconst right = y.ap(y).ap(y)\r\n\r\nconsole.log(\"left === right:\", left === right);\r\nconsole.log(\"left value:\", left.value.toString());\r\nconsole.log(\"right value:\", right.value.toString());\r\n```\r\n\r\n### Running test.js\r\n\r\n```bash\r\n$ node test\r\nleft === right: false\r\nleft value: g => x => f(g(x))\r\nright value: x => x\r\n```"},"comment":{"url":"https://api.github.com/repos/fantasyland/fantasy-land/issues/comments/266559311","html_url":"https://github.com/fantasyland/fantasy-land/issues/209#issuecomment-266559311","issue_url":"https://api.github.com/repos/fantasyland/fantasy-land/issues/209","id":266559311,"user":{"login":"joneshf","id":1356417,"avatar_url":"https://avatars.githubusercontent.com/u/1356417?v=3","gravatar_id":"","url":"https://api.github.com/users/joneshf","html_url":"https://github.com/joneshf","followers_url":"https://api.github.com/users/joneshf/followers","following_url":"https://api.github.com/users/joneshf/following{/other_user}","gists_url":"https://api.github.com/users/joneshf/gists{/gist_id}","starred_url":"https://api.github.com/users/joneshf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joneshf/subscriptions","organizations_url":"https://api.github.com/users/joneshf/orgs","repos_url":"https://api.github.com/users/joneshf/repos","events_url":"https://api.github.com/users/joneshf/events{/privacy}","received_events_url":"https://api.github.com/users/joneshf/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T21:32:51Z","updated_at":"2016-12-12T21:32:51Z","body":"`ap` exists in Prelude as well.\r\n\r\n```haskell\r\nλ: ap [(*10),(*100),(*1000)] [1,2,3]\r\n[10,20,30,100,200,300,1000,2000,3000]\r\n```"}}
{"actor":{"display_login":"joneshf"}}