{"action":"created","issue":{"url":"https://api.github.com/repos/selfrefactor/rambda/issues/77","repository_url":"https://api.github.com/repos/selfrefactor/rambda","labels_url":"https://api.github.com/repos/selfrefactor/rambda/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/selfrefactor/rambda/issues/77/comments","events_url":"https://api.github.com/repos/selfrefactor/rambda/issues/77/events","html_url":"https://github.com/selfrefactor/rambda/issues/77","id":344500696,"node_id":"MDU6SXNzdWUzNDQ1MDA2OTY=","number":77,"title":"Curry trouble (example for R.is)","user":{"login":"noobiek","id":13305123,"node_id":"MDQ6VXNlcjEzMzA1MTIz","avatar_url":"https://avatars2.githubusercontent.com/u/13305123?v=4","gravatar_id":"","url":"https://api.github.com/users/noobiek","html_url":"https://github.com/noobiek","followers_url":"https://api.github.com/users/noobiek/followers","following_url":"https://api.github.com/users/noobiek/following{/other_user}","gists_url":"https://api.github.com/users/noobiek/gists{/gist_id}","starred_url":"https://api.github.com/users/noobiek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noobiek/subscriptions","organizations_url":"https://api.github.com/users/noobiek/orgs","repos_url":"https://api.github.com/users/noobiek/repos","events_url":"https://api.github.com/users/noobiek/events{/privacy}","received_events_url":"https://api.github.com/users/noobiek/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-07-25T15:44:42Z","updated_at":"2018-08-10T11:12:16Z","closed_at":"2018-07-31T13:55:19Z","author_association":"NONE","body":"Hi,\r\n\r\nI understand this has to do with curry, but I constantly have trouble with R.is because of this, so...\r\nThe troube comes when I do something like this\r\n`if (R.is(Array, someVar)) { ... }`\r\nNow, if someVar is undefined then R.is will return function, so the check will pass.\r\nThis may happen in a bigger scope, when my function accepts an object A, and one of its fields B should be an array:\r\n```\r\nfunction myFunc(A) {\r\n...\r\n  if (R.is(Array, A.B)) { ... }\r\n...\r\n}\r\n```\r\nSo, if B was not defined, the IF block will proceed as if B were an array.\r\nI can add an additional check \r\n`if (A.B && R.is(Array, A.B)) { ... }`\r\nBut that just doesn't feel and look right. Right?"},"comment":{"url":"https://api.github.com/repos/selfrefactor/rambda/issues/comments/412052587","html_url":"https://github.com/selfrefactor/rambda/issues/77#issuecomment-412052587","issue_url":"https://api.github.com/repos/selfrefactor/rambda/issues/77","id":412052587,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjA1MjU4Nw==","user":{"login":"selfrefactor","id":2149294,"node_id":"MDQ6VXNlcjIxNDkyOTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2149294?v=4","gravatar_id":"","url":"https://api.github.com/users/selfrefactor","html_url":"https://github.com/selfrefactor","followers_url":"https://api.github.com/users/selfrefactor/followers","following_url":"https://api.github.com/users/selfrefactor/following{/other_user}","gists_url":"https://api.github.com/users/selfrefactor/gists{/gist_id}","starred_url":"https://api.github.com/users/selfrefactor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/selfrefactor/subscriptions","organizations_url":"https://api.github.com/users/selfrefactor/orgs","repos_url":"https://api.github.com/users/selfrefactor/repos","events_url":"https://api.github.com/users/selfrefactor/events{/privacy}","received_events_url":"https://api.github.com/users/selfrefactor/received_events","type":"User","site_admin":false},"created_at":"2018-08-10T11:12:16Z","updated_at":"2018-08-10T11:12:16Z","author_association":"OWNER","body":"Ok, so what is your suggestion. `map` to return `[]` when `undefined` is provided instead of array, or I am missing something?"}}
{"actor":{"display_login":"selfrefactor"}}