{"action":"created","issue":{"url":"https://api.github.com/repos/char0n/ramda-adjunct/issues/372","repository_url":"https://api.github.com/repos/char0n/ramda-adjunct","labels_url":"https://api.github.com/repos/char0n/ramda-adjunct/issues/372/labels{/name}","comments_url":"https://api.github.com/repos/char0n/ramda-adjunct/issues/372/comments","events_url":"https://api.github.com/repos/char0n/ramda-adjunct/issues/372/events","html_url":"https://github.com/char0n/ramda-adjunct/issues/372","id":297936631,"number":372,"title":"findOr","user":{"login":"char0n","id":193286,"avatar_url":"https://avatars1.githubusercontent.com/u/193286?v=4","gravatar_id":"","url":"https://api.github.com/users/char0n","html_url":"https://github.com/char0n","followers_url":"https://api.github.com/users/char0n/followers","following_url":"https://api.github.com/users/char0n/following{/other_user}","gists_url":"https://api.github.com/users/char0n/gists{/gist_id}","starred_url":"https://api.github.com/users/char0n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/char0n/subscriptions","organizations_url":"https://api.github.com/users/char0n/orgs","repos_url":"https://api.github.com/users/char0n/repos","events_url":"https://api.github.com/users/char0n/events{/privacy}","received_events_url":"https://api.github.com/users/char0n/received_events","type":"User","site_admin":false},"labels":[{"id":536676145,"url":"https://api.github.com/repos/char0n/ramda-adjunct/labels/feature","name":"feature","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-16T22:15:42Z","updated_at":"2018-02-23T11:31:36Z","closed_at":null,"author_association":"OWNER","body":"```js\r\nexport const findOr = curry((defaultValue, fn, arr) => pipe(find(fn), defaultTo(defaultValue))(arr));"},"comment":{"url":"https://api.github.com/repos/char0n/ramda-adjunct/issues/comments/367985137","html_url":"https://github.com/char0n/ramda-adjunct/issues/372#issuecomment-367985137","issue_url":"https://api.github.com/repos/char0n/ramda-adjunct/issues/372","id":367985137,"user":{"login":"GingerPlusPlus","id":23058303,"avatar_url":"https://avatars1.githubusercontent.com/u/23058303?v=4","gravatar_id":"","url":"https://api.github.com/users/GingerPlusPlus","html_url":"https://github.com/GingerPlusPlus","followers_url":"https://api.github.com/users/GingerPlusPlus/followers","following_url":"https://api.github.com/users/GingerPlusPlus/following{/other_user}","gists_url":"https://api.github.com/users/GingerPlusPlus/gists{/gist_id}","starred_url":"https://api.github.com/users/GingerPlusPlus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GingerPlusPlus/subscriptions","organizations_url":"https://api.github.com/users/GingerPlusPlus/orgs","repos_url":"https://api.github.com/users/GingerPlusPlus/repos","events_url":"https://api.github.com/users/GingerPlusPlus/events{/privacy}","received_events_url":"https://api.github.com/users/GingerPlusPlus/received_events","type":"User","site_admin":false},"created_at":"2018-02-23T11:31:36Z","updated_at":"2018-02-23T11:31:36Z","author_association":"CONTRIBUTOR","body":"You can't distinguish between finding `undefined` and not finding this way. It easy to handle for arrays:\r\n\r\n```js\r\n(defaultValue, fn, arr) => {\r\n  const index = R.findIndex(fn, arr)\r\n  if (index === -1) {\r\n    return defaultValue\r\n  } else {\r\n    return arr[index]\r\n  }\r\n}\r\n```\r\n\r\nI'm not sure if it'd work for other types working with `R.find`."}}
{"actor":{"display_login":"GingerPlusPlus"}}