{"action":"created","issue":{"url":"https://api.github.com/repos/antitypical/Result/issues/75","labels_url":"https://api.github.com/repos/antitypical/Result/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/antitypical/Result/issues/75/comments","events_url":"https://api.github.com/repos/antitypical/Result/issues/75/events","html_url":"https://github.com/antitypical/Result/issues/75","id":101946418,"number":75,"title":"how to handle Result<nil, nil> ?","user":{"login":"connectdotz","id":891093,"avatar_url":"https://avatars.githubusercontent.com/u/891093?v=3","gravatar_id":"","url":"https://api.github.com/users/connectdotz","html_url":"https://github.com/connectdotz","followers_url":"https://api.github.com/users/connectdotz/followers","following_url":"https://api.github.com/users/connectdotz/following{/other_user}","gists_url":"https://api.github.com/users/connectdotz/gists{/gist_id}","starred_url":"https://api.github.com/users/connectdotz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connectdotz/subscriptions","organizations_url":"https://api.github.com/users/connectdotz/orgs","repos_url":"https://api.github.com/users/connectdotz/repos","events_url":"https://api.github.com/users/connectdotz/events{/privacy}","received_events_url":"https://api.github.com/users/connectdotz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-19T16:58:42Z","updated_at":"2015-08-20T02:21:12Z","closed_at":null,"body":"How to handle the use case when both result value and error are nil...  For example when querying db yielding no result, it is not an error but we have nothing to return either. I know we can return an empty array to work around this issue, but seems like there should be a more elegant and clean solution...??\r\n"},"comment":{"url":"https://api.github.com/repos/antitypical/Result/issues/comments/132854712","html_url":"https://github.com/antitypical/Result/issues/75#issuecomment-132854712","issue_url":"https://api.github.com/repos/antitypical/Result/issues/75","id":132854712,"user":{"login":"connectdotz","id":891093,"avatar_url":"https://avatars.githubusercontent.com/u/891093?v=3","gravatar_id":"","url":"https://api.github.com/users/connectdotz","html_url":"https://github.com/connectdotz","followers_url":"https://api.github.com/users/connectdotz/followers","following_url":"https://api.github.com/users/connectdotz/following{/other_user}","gists_url":"https://api.github.com/users/connectdotz/gists{/gist_id}","starred_url":"https://api.github.com/users/connectdotz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connectdotz/subscriptions","organizations_url":"https://api.github.com/users/connectdotz/orgs","repos_url":"https://api.github.com/users/connectdotz/repos","events_url":"https://api.github.com/users/connectdotz/events{/privacy}","received_events_url":"https://api.github.com/users/connectdotz/received_events","type":"User","site_admin":false},"created_at":"2015-08-20T02:21:12Z","updated_at":"2015-08-20T02:21:12Z","body":"Sure, but the question remain that how do we elegantly retrieve the actual value without verbose workaround\r\n\r\n```\r\nif let s1 = test1().value, s = s1 ...\r\n\r\nif let s = (test1().value ?? nil) ...\r\n```\r\nIs there a better way to do this double-optional unwrapping? Can the value property unwrap the optional value before returning? Ideally ` if let s = test1.value` should work for either `Result<String,Error>` or `Result<String?,Error>`..."}}