{"action":"created","issue":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/3321","labels_url":"https://api.github.com/repos/nim-lang/Nim/issues/3321/labels{/name}","comments_url":"https://api.github.com/repos/nim-lang/Nim/issues/3321/comments","events_url":"https://api.github.com/repos/nim-lang/Nim/issues/3321/events","html_url":"https://github.com/nim-lang/Nim/pull/3321","id":106233123,"number":3321,"title":"Extend options module","user":{"login":"Nycto","id":30517,"avatar_url":"https://avatars.githubusercontent.com/u/30517?v=3","gravatar_id":"","url":"https://api.github.com/users/Nycto","html_url":"https://github.com/Nycto","followers_url":"https://api.github.com/users/Nycto/followers","following_url":"https://api.github.com/users/Nycto/following{/other_user}","gists_url":"https://api.github.com/users/Nycto/gists{/gist_id}","starred_url":"https://api.github.com/users/Nycto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nycto/subscriptions","organizations_url":"https://api.github.com/users/Nycto/orgs","repos_url":"https://api.github.com/users/Nycto/repos","events_url":"https://api.github.com/users/Nycto/events{/privacy}","received_events_url":"https://api.github.com/users/Nycto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-13T18:39:56Z","updated_at":"2015-09-18T04:53:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nim-lang/Nim/pulls/3321","html_url":"https://github.com/nim-lang/Nim/pull/3321","diff_url":"https://github.com/nim-lang/Nim/pull/3321.diff","patch_url":"https://github.com/nim-lang/Nim/pull/3321.patch"},"body":"This adds a few convenience methods to the `options` module:\r\n\r\n* `get` with a default value\r\n* `each`\r\n* `map`\r\n* `filter`\r\n* `$`"},"comment":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/comments/141343835","html_url":"https://github.com/nim-lang/Nim/pull/3321#issuecomment-141343835","issue_url":"https://api.github.com/repos/nim-lang/Nim/issues/3321","id":141343835,"user":{"login":"vegansk","id":2908508,"avatar_url":"https://avatars.githubusercontent.com/u/2908508?v=3","gravatar_id":"","url":"https://api.github.com/users/vegansk","html_url":"https://github.com/vegansk","followers_url":"https://api.github.com/users/vegansk/followers","following_url":"https://api.github.com/users/vegansk/following{/other_user}","gists_url":"https://api.github.com/users/vegansk/gists{/gist_id}","starred_url":"https://api.github.com/users/vegansk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vegansk/subscriptions","organizations_url":"https://api.github.com/users/vegansk/orgs","repos_url":"https://api.github.com/users/vegansk/repos","events_url":"https://api.github.com/users/vegansk/events{/privacy}","received_events_url":"https://api.github.com/users/vegansk/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T04:53:18Z","updated_at":"2015-09-18T04:53:18Z","body":"The use case for filter :-)\r\n\r\n```nimrod\r\ntype Bar = discard\r\ntype Girl = object\r\n  age: int\r\nproc findNearestGirl(b: Bar): Option[Girl] = discard\r\n\r\nvar bar: Bar\r\nbar.findNearestGirl().filter((g: Girl) => g.age >= 21)\r\n```"}}