/*** Generated by streamline generators 0.1.0 - DO NOT EDIT ***/var fstreamline__ = require("streamline/lib/generators/runtime"); (fstreamline__.create(function(_) {var wait_ = fstreamline__.create(wait, 0), echo_ = fstreamline__.create(echo, 0); if (typeof setTimeout === 'undefined') {
	this.setTimeout = function(cb, ms) {
			return new require('uv').Timer().start(ms, 0, cb);
		}
}
if (typeof console === 'undefined') {
	this.console = {
		log: print
	};
}

function wait(_, ms) {
	(yield fstreamline__.invoke(null, setTimeout, [_, ms], 0));
;yield;}

function echo(_, str) {
	console.log("waiting ...");
	(yield wait(_, 1000));
	console.log("echoing " + str)
	yield  str;
}

var helloWorld = fstreamline__.create(function(_) {
	yield  (yield echo(_, "Hello")) + ' ' + (yield echo(_, "world!")); 
}, 0)

helloWorld(function(err, result) {
	console.log("err=" + err + ", result=" + result);
});
;yield;}, 0).call(this, function(err) {
  if (err) throw err;
}));