Recursive function (just sharing)

For some reason I never had to do recursive functions, so when I finally had to do some, I was baffled I never learned it before. :cyclops:

ie, this is in educational purpose only - an ordinary for loop - rewritten as a recursive function.

(I had to use the recursive function to parse unknown object loop sizes)

function forloop():void
{
	var i=0;
	function loop():void
	{
		if(i<100)
		{
			//do something
			trace("current i: " + i );
			i++;
			loop();
		}else{
			trace("done");
		}
	}
	loop();
}
forloop()