{"action":"opened","issue":{"url":"https://api.github.com/repos/javaslang/javaslang/issues/754","labels_url":"https://api.github.com/repos/javaslang/javaslang/issues/754/labels{/name}","comments_url":"https://api.github.com/repos/javaslang/javaslang/issues/754/comments","events_url":"https://api.github.com/repos/javaslang/javaslang/issues/754/events","html_url":"https://github.com/javaslang/javaslang/issues/754","id":114766965,"number":754,"title":"Performance improvement: Implement Value.isSingleton()","user":{"login":"danieldietrich","id":743833,"avatar_url":"https://avatars.githubusercontent.com/u/743833?v=3","gravatar_id":"","url":"https://api.github.com/users/danieldietrich","html_url":"https://github.com/danieldietrich","followers_url":"https://api.github.com/users/danieldietrich/followers","following_url":"https://api.github.com/users/danieldietrich/following{/other_user}","gists_url":"https://api.github.com/users/danieldietrich/gists{/gist_id}","starred_url":"https://api.github.com/users/danieldietrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieldietrich/subscriptions","organizations_url":"https://api.github.com/users/danieldietrich/orgs","repos_url":"https://api.github.com/users/danieldietrich/repos","events_url":"https://api.github.com/users/danieldietrich/events{/privacy}","received_events_url":"https://api.github.com/users/danieldietrich/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/javaslang/javaslang/labels/feature","name":"feature","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/javaslang/javaslang/milestones/18","html_url":"https://github.com/javaslang/javaslang/milestones/2.0.0","labels_url":"https://api.github.com/repos/javaslang/javaslang/milestones/18/labels","id":1091674,"number":18,"title":"2.0.0","description":"","creator":{"login":"danieldietrich","id":743833,"avatar_url":"https://avatars.githubusercontent.com/u/743833?v=3","gravatar_id":"","url":"https://api.github.com/users/danieldietrich","html_url":"https://github.com/danieldietrich","followers_url":"https://api.github.com/users/danieldietrich/followers","following_url":"https://api.github.com/users/danieldietrich/following{/other_user}","gists_url":"https://api.github.com/users/danieldietrich/gists{/gist_id}","starred_url":"https://api.github.com/users/danieldietrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieldietrich/subscriptions","organizations_url":"https://api.github.com/users/danieldietrich/orgs","repos_url":"https://api.github.com/users/danieldietrich/repos","events_url":"https://api.github.com/users/danieldietrich/events{/privacy}","received_events_url":"https://api.github.com/users/danieldietrich/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":178,"state":"open","created_at":"2015-04-30T20:29:59Z","updated_at":"2015-11-03T08:21:50Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-11-03T08:21:50Z","updated_at":"2015-11-03T08:21:50Z","closed_at":null,"body":"`TraversableOnce` has `isTraversableAgain()`.\r\n\r\n`Value` should have `isSingleton` in an analog way to reflect, that there is only one value.\r\n\r\nType which have one value (if defined) are: Option, Try, Either, Match, Lazy, Future\r\n\r\nOptions with more that one value are: TraversableOnce, Iterator, Gen, Arbitrary\r\n\r\n**Use-case:** Having this value we may simplify the conversion methods `toXxx()` and monadic methods `map()`, `flatMap()`, ...\r\n\r\nInstead of using `instanceof` to check for the right type or using `iterator()` to check for `hasNext()`, we could use `isSingleton()` and use `get()`."}}