visionmedia/co — pull request #86 by dunxrion (2014-02-04 17:53:49+00:00)
Title: Example of binding function as thunk.

Instead of always 'thunkifying' an object, how about using the native bind function? This PR request just adds the following to the `examples`. Maybe it may come in handy as another method of creating thunks without the extra dependency.

```js
var co = require('..'),
fs = require('fs');

co(function *() {
var directories = yield fs.readdir.bind(fs, './../');

directories.forEach(function(directory) {
console.log(directory);
});

})();
```