Generator Redirect 1

Summary

Lets you work with generators.

Syntax

function fibonacci(){
	var fn1 = 1;
	var fn2 = 1;
		while (1){
			var current = fn2;
			fn2 = fn1;
			fn1 = fn1 + current;
			yield current;
		}
	}
 
var it = fibonacci();
var it2 = (i * 2 for (i in it));

Methods

For methods available on Generator Redirect 1 instances, see Methods of Generator Redirect 1 instances.

next
send

Document Tags and Contributors

 Last updated by: Sheppy,