{"action":"created","issue":{"url":"https://api.github.com/repos/tj/co/issues/156","labels_url":"https://api.github.com/repos/tj/co/issues/156/labels{/name}","comments_url":"https://api.github.com/repos/tj/co/issues/156/comments","events_url":"https://api.github.com/repos/tj/co/issues/156/events","html_url":"https://github.com/tj/co/issues/156","id":47258085,"number":156,"title":"Generator function arguments","user":{"login":"rainder","id":1492322,"avatar_url":"https://avatars.githubusercontent.com/u/1492322?v=3","gravatar_id":"","url":"https://api.github.com/users/rainder","html_url":"https://github.com/rainder","followers_url":"https://api.github.com/users/rainder/followers","following_url":"https://api.github.com/users/rainder/following{/other_user}","gists_url":"https://api.github.com/users/rainder/gists{/gist_id}","starred_url":"https://api.github.com/users/rainder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rainder/subscriptions","organizations_url":"https://api.github.com/users/rainder/orgs","repos_url":"https://api.github.com/users/rainder/repos","events_url":"https://api.github.com/users/rainder/events{/privacy}","received_events_url":"https://api.github.com/users/rainder/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-10-30T11:18:08Z","updated_at":"2015-07-05T17:20:35Z","closed_at":"2014-11-03T21:36:08Z","body":"Is there a way of passing arguments AND context directly into generator function using co? This is what I wanna achieve:\r\n```javascript\r\nvar ctx = {};\r\n\r\nvar asyncFunction = function *(arg1) {\r\n  expect(this).to.equal(ctx);\r\n  expect(arg1).to.equal('hello');\r\n  return true;\r\n};\r\n\r\nco(function*() {\r\n  var b = yield asyncFunction.bind(ctx, 'hello');\r\n  expect(b).to.equal(true);\r\n})();\r\n```"},"comment":{"url":"https://api.github.com/repos/tj/co/issues/comments/118639103","html_url":"https://github.com/tj/co/issues/156#issuecomment-118639103","issue_url":"https://api.github.com/repos/tj/co/issues/156","id":118639103,"user":{"login":"bucaran","id":8317250,"avatar_url":"https://avatars.githubusercontent.com/u/8317250?v=3","gravatar_id":"","url":"https://api.github.com/users/bucaran","html_url":"https://github.com/bucaran","followers_url":"https://api.github.com/users/bucaran/followers","following_url":"https://api.github.com/users/bucaran/following{/other_user}","gists_url":"https://api.github.com/users/bucaran/gists{/gist_id}","starred_url":"https://api.github.com/users/bucaran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bucaran/subscriptions","organizations_url":"https://api.github.com/users/bucaran/orgs","repos_url":"https://api.github.com/users/bucaran/repos","events_url":"https://api.github.com/users/bucaran/events{/privacy}","received_events_url":"https://api.github.com/users/bucaran/received_events","type":"User","site_admin":false},"created_at":"2015-07-05T17:20:35Z","updated_at":"2015-07-05T17:20:35Z","body":"I can't find tests for this and I am unable to make the first example you wrote above work.\r\n\r\n```js\r\nco(asyncFunction).call(ctx, 'hello');\r\n```"}}