{"action":"created","issue":{"url":"https://api.github.com/repos/ceylon/ceylon-spec/issues/1256","labels_url":"https://api.github.com/repos/ceylon/ceylon-spec/issues/1256/labels{/name}","comments_url":"https://api.github.com/repos/ceylon/ceylon-spec/issues/1256/comments","events_url":"https://api.github.com/repos/ceylon/ceylon-spec/issues/1256/events","html_url":"https://github.com/ceylon/ceylon-spec/issues/1256","id":60863457,"number":1256,"title":"Ruby-style blocks","user":{"login":"sadmac7000","id":1865365,"avatar_url":"https://avatars.githubusercontent.com/u/1865365?v=3","gravatar_id":"","url":"https://api.github.com/users/sadmac7000","html_url":"https://github.com/sadmac7000","followers_url":"https://api.github.com/users/sadmac7000/followers","following_url":"https://api.github.com/users/sadmac7000/following{/other_user}","gists_url":"https://api.github.com/users/sadmac7000/gists{/gist_id}","starred_url":"https://api.github.com/users/sadmac7000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sadmac7000/subscriptions","organizations_url":"https://api.github.com/users/sadmac7000/orgs","repos_url":"https://api.github.com/users/sadmac7000/repos","events_url":"https://api.github.com/users/sadmac7000/events{/privacy}","received_events_url":"https://api.github.com/users/sadmac7000/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ceylon/ceylon-spec/labels/basic%20language","name":"basic language","color":"AA1155"},{"url":"https://api.github.com/repos/ceylon/ceylon-spec/labels/feature","name":"feature","color":"02e10c"},{"url":"https://api.github.com/repos/ceylon/ceylon-spec/labels/high%20priority","name":"high priority","color":"d7e102"}],"state":"open","locked":false,"assignee":{"login":"gavinking","id":579974,"avatar_url":"https://avatars.githubusercontent.com/u/579974?v=3","gravatar_id":"","url":"https://api.github.com/users/gavinking","html_url":"https://github.com/gavinking","followers_url":"https://api.github.com/users/gavinking/followers","following_url":"https://api.github.com/users/gavinking/following{/other_user}","gists_url":"https://api.github.com/users/gavinking/gists{/gist_id}","starred_url":"https://api.github.com/users/gavinking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavinking/subscriptions","organizations_url":"https://api.github.com/users/gavinking/orgs","repos_url":"https://api.github.com/users/gavinking/repos","events_url":"https://api.github.com/users/gavinking/events{/privacy}","received_events_url":"https://api.github.com/users/gavinking/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/ceylon/ceylon-spec/milestones/12","html_url":"https://github.com/ceylon/ceylon-spec/milestones/1.2.1","labels_url":"https://api.github.com/repos/ceylon/ceylon-spec/milestones/12/labels","id":1392140,"number":12,"title":"1.2.1","description":"","creator":{"login":"gavinking","id":579974,"avatar_url":"https://avatars.githubusercontent.com/u/579974?v=3","gravatar_id":"","url":"https://api.github.com/users/gavinking","html_url":"https://github.com/gavinking","followers_url":"https://api.github.com/users/gavinking/followers","following_url":"https://api.github.com/users/gavinking/following{/other_user}","gists_url":"https://api.github.com/users/gavinking/gists{/gist_id}","starred_url":"https://api.github.com/users/gavinking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavinking/subscriptions","organizations_url":"https://api.github.com/users/gavinking/orgs","repos_url":"https://api.github.com/users/gavinking/repos","events_url":"https://api.github.com/users/gavinking/events{/privacy}","received_events_url":"https://api.github.com/users/gavinking/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2015-11-03T20:18:36Z","updated_at":"2015-11-05T22:39:58Z","due_on":"2015-12-30T23:00:00Z","closed_at":null},"comments":18,"created_at":"2015-03-12T17:48:27Z","updated_at":"2015-11-05T22:53:06Z","closed_at":null,"body":"I'm proposing the following new argument syntax specifically for passing a single argument which is a function:\r\n\r\n```ceylon\r\n    value foo = [6,7,8,9,10];\r\n    value bar = foo.select{ |x|\r\n        return (x == 7 || (x % 2) == 0);\r\n    };\r\n```\r\n\r\nI'd have proposed this earlier, but I feared named argument lists would conflict with it. I think the presence of the argument list at the beginning of the block makes this unambiguous.\r\n\r\nThe only question would be blocks which take no arguments. Since we need the argument list, we'd need to pass an empty one. We could use `||` or `|void|` for this (I prefer the later)."},"comment":{"url":"https://api.github.com/repos/ceylon/ceylon-spec/issues/comments/154221540","html_url":"https://github.com/ceylon/ceylon-spec/issues/1256#issuecomment-154221540","issue_url":"https://api.github.com/repos/ceylon/ceylon-spec/issues/1256","id":154221540,"user":{"login":"gavinking","id":579974,"avatar_url":"https://avatars.githubusercontent.com/u/579974?v=3","gravatar_id":"","url":"https://api.github.com/users/gavinking","html_url":"https://github.com/gavinking","followers_url":"https://api.github.com/users/gavinking/followers","following_url":"https://api.github.com/users/gavinking/following{/other_user}","gists_url":"https://api.github.com/users/gavinking/gists{/gist_id}","starred_url":"https://api.github.com/users/gavinking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavinking/subscriptions","organizations_url":"https://api.github.com/users/gavinking/orgs","repos_url":"https://api.github.com/users/gavinking/repos","events_url":"https://api.github.com/users/gavinking/events{/privacy}","received_events_url":"https://api.github.com/users/gavinking/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T22:53:06Z","updated_at":"2015-11-05T22:53:06Z","body":"Right, that's certainly what I'm proposing. The above behavior is a bug, resulting from an ambiguity that I did not notice until a couple of days ago."}}