a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f); 
if(typeof a == "string"){ a = a.split(""); } o = o || d.global; f = df.lambda(f); 
(function(){	var d = dojo, df = dojox.lang.functional;	d.mixin(df, {		// classic reduce-class functions		scanl: function(/*Array*/ a, /*Function|String|Array*/ f, /*Object*/ z, /*Object?*/ o){			// summary: repeatedly applies a binary function to an array from left 			//	to right using a seed value as a starting point; returns an array			//	of values produced by foldl() at that point.			a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f);			var n = a.length, t = new Array(n + 1);			t[0] = z;			for(var i = 0; i < n; z = f.call(o, z, a[i], i, a), t[++i] = z);			return t;	// Array		},		scanl1: function(/*Array*/ a, /*Function|String|Array*/ f, /*Object*/ z, /*Object?*/ o){			// summary: repeatedly applies a binary function to an array from left 			//	to right; returns an array of values produced by foldl1() at that 			//	point.			a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f);			var n = a.length, t = new Array(n), z = a[0];			t[0] = z;			for(var i = 1; i < n; z = f.call(o, z, a[i], i, a), t[i++] = z);			return t;	// Array		},		scanr: function(/*Array*/ a, /*Function|String|Array*/ f, /*Object*/ z, /*Object?*/ o){			// summary: repeatedly applies a binary function to an array from right			//	to left using a seed value as a starting point; returns an array			//	of values produced by foldr() at that point.			a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f);			var n = a.length, t = new Array(n + 1);			t[n] = z;			for(var i = n; i > 0; --i, z = f.call(o, z, a[i], i, a), t[i] = z);			return t;	// Array		},		scanr1: function(/*Array*/ a, /*Function|String|Array*/ f, /*Object*/ z, /*Object?*/ o){			// summary: repeatedly applies a binary function to an array from right			//	to left; returns an array of values produced by foldr1() at that 			//	point.			a = typeof a == "string" ? a.split("") : a; o = o || d.global; f = df.lambda(f);			var n = a.length, t = new Array(n), z = a[n - 1];			t[n - 1] = z;			for(var i = n - 1; i > 0; --i, z = f.call(o, z, a[i], i, a), t[i] = z);			return t;	// Array		}	});})();
5168	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5168/62a62d09b56dc6a72b26627116aa504ec9a2dc81/scan.js/buggy/lang/functional/scan.js