{"action":"created","issue":{"url":"https://api.github.com/repos/DrBoolean/mostly-adequate-guide/issues/131","labels_url":"https://api.github.com/repos/DrBoolean/mostly-adequate-guide/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/DrBoolean/mostly-adequate-guide/issues/131/comments","events_url":"https://api.github.com/repos/DrBoolean/mostly-adequate-guide/issues/131/events","html_url":"https://github.com/DrBoolean/mostly-adequate-guide/issues/131","id":98786127,"number":131,"title":"`compose(id, f) == compose(f, id) == f` evaluates to false in JavaScript (chapter 5)","user":{"login":"rpominov","id":825702,"avatar_url":"https://avatars.githubusercontent.com/u/825702?v=3","gravatar_id":"","url":"https://api.github.com/users/rpominov","html_url":"https://github.com/rpominov","followers_url":"https://api.github.com/users/rpominov/followers","following_url":"https://api.github.com/users/rpominov/following{/other_user}","gists_url":"https://api.github.com/users/rpominov/gists{/gist_id}","starred_url":"https://api.github.com/users/rpominov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpominov/subscriptions","organizations_url":"https://api.github.com/users/rpominov/orgs","repos_url":"https://api.github.com/users/rpominov/repos","events_url":"https://api.github.com/users/rpominov/events{/privacy}","received_events_url":"https://api.github.com/users/rpominov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-03T16:33:13Z","updated_at":"2015-08-04T16:21:11Z","closed_at":null,"body":"For 2 reasons actually :)\r\n\r\n1. `(compose(f, id) == f) === false` because even though functions are equivalent, JavaScript can't detect that equality.\r\n1. After `compose(f, id) == f` evaluates to `false` we are comparing `compose(id, f)` and `false`, which is also `false`.\r\n\r\nThis line might be correct as a pseudo code, but presence of `var` suggest that it's a JavaScript code."},"comment":{"url":"https://api.github.com/repos/DrBoolean/mostly-adequate-guide/issues/comments/127663901","html_url":"https://github.com/DrBoolean/mostly-adequate-guide/issues/131#issuecomment-127663901","issue_url":"https://api.github.com/repos/DrBoolean/mostly-adequate-guide/issues/131","id":127663901,"user":{"login":"rpominov","id":825702,"avatar_url":"https://avatars.githubusercontent.com/u/825702?v=3","gravatar_id":"","url":"https://api.github.com/users/rpominov","html_url":"https://github.com/rpominov","followers_url":"https://api.github.com/users/rpominov/followers","following_url":"https://api.github.com/users/rpominov/following{/other_user}","gists_url":"https://api.github.com/users/rpominov/gists{/gist_id}","starred_url":"https://api.github.com/users/rpominov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpominov/subscriptions","organizations_url":"https://api.github.com/users/rpominov/orgs","repos_url":"https://api.github.com/users/rpominov/repos","events_url":"https://api.github.com/users/rpominov/events{/privacy}","received_events_url":"https://api.github.com/users/rpominov/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T16:21:11Z","updated_at":"2015-08-04T16:21:11Z","body":"Yeah, I understand of course that `==` supposed to mean functional equality, it just seems confusing together with `var identity =`, so the code looks like JavaScript that actually evaluates to `false` :smile: \r\n\r\n> Awesome book, by the way :+1:\r\n\r\n+1, thanks a lot for working on it, @DrBoolean!\r\n"}}