Skip to content

Instantly share code, notes, and snippets.

@hokaccha
Created January 13, 2014 02:01
Show Gist options
  • Select an option

  • Save hokaccha/8393484 to your computer and use it in GitHub Desktop.

Select an option

Save hokaccha/8393484 to your computer and use it in GitHub Desktop.
var co = require('co');
var fs = require('fs');
co(function* () {
var a = yield fs.readFile.bind(fs, 'a.txt', 'utf8');
var b = yield fs.readFile.bind(fs, a.trim(), 'utf8');
var c = yield fs.readFile.bind(fs, b.trim(), 'utf8');
console.log(c.trim());
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment