<commit_before>/*
==================================================================================================
	Lowland - JavaScript low level functions
	Copyright (C) 2012 <NAME>
==================================================================================================
*/

(function(window) {
	var slice = Array.prototype.slice;
	
	var nativeCurryBind = (function() {
		var p1 = 42;
		var f = function(a1) {
			return a1 === p1;
		}.bind(this, p1);
		return f();
	})();
	
	core.Module("lowland.Function", {
		/**
		 * Delays function for @time {Integer} milliseconds and after that time executes function
		 * in @context {var}.
		 */
		delay : function(time, context, func) {
			var args = [func, context, time, slice.call(arguments, 3));
			return core.Function.timeout.apply(this, args);
		},
		
		/**
		 * {Number} Based upon work of http://dbaron.org/log/20100309-faster-timeouts
		 * Calls function lazy in @context {var}.
		 */
		lazy : function(context, fnt) {
			if (arguments.length > 2) {
				fnt = core.Function.curry.apply(this, [fnt].concat(slice.call(arguments, 2)));
			}
			return core.Function.immediate(fnt, context);
		},
		
		/**
		 * DEPRECATED! Cancel lazy request with given @id {Number}.
		 */
		cancelLazy : function(id) {
			console.warn("Deprecated");
			/*for (var i=0; i<timeouts.length; i++) {
				if (timeouts[i][3] === id) {
					timeouts.splice(i, 1);
					return true;
				}
			}
			return false;*/
		},

		curryBind : nativeCurryBind ? function(func, context) {
			if (jasy.Env.isSet("debug")) {
				core.Assert.isType(func, "Function");
				core.Assert.isType(context, "Object");
			}

    			var boundName = "bound:curry:" + core.util.Id.get(func);

			return context[boundName] || (
				context[boundName] = func.bind.apply(func, [context].concat(slice.call(arguments, 2)))
			);
		} : function(func, context) {
			return core.Function.bind(core.Function.curry.apply(this, [func].concat(slice.call(arguments, 2))), context);
		};
	});
	
})(window);
<commit_msg>Fix syntax errors<commit_after>/*
==================================================================================================
	Lowland - JavaScript low level functions
	Copyright (C) 2012 <NAME>
==================================================================================================
*/

(function(window) {
	var slice = Array.prototype.slice;
	
	var nativeCurryBind = (function() {
		var p1 = 42;
		var f = function(a1) {
			return a1 === p1;
		}.bind(this, p1);
		return f();
	})();
	
	core.Module("lowland.Function", {
		/**
		 * Delays function for @time {Integer} milliseconds and after that time executes function
		 * in @context {var}.
		 */
		delay : function(time, context, func) {
			var args = [func, context, time, slice.call(arguments, 3)];
			return core.Function.timeout.apply(this, args);
		},
		
		/**
		 * {Number} Based upon work of http://dbaron.org/log/20100309-faster-timeouts
		 * Calls function lazy in @context {var}.
		 */
		lazy : function(context, fnt) {
			if (arguments.length > 2) {
				fnt = core.Function.curry.apply(this, [fnt].concat(slice.call(arguments, 2)));
			}
			return core.Function.immediate(fnt, context);
		},
		
		/**
		 * DEPRECATED! Cancel lazy request with given @id {Number}.
		 */
		cancelLazy : function(id) {
			console.warn("Deprecated");
			/*for (var i=0; i<timeouts.length; i++) {
				if (timeouts[i][3] === id) {
					timeouts.splice(i, 1);
					return true;
				}
			}
			return false;*/
		},

		curryBind : nativeCurryBind ? function(func, context) {
			if (jasy.Env.isSet("debug")) {
				core.Assert.isType(func, "Function");
				core.Assert.isType(context, "Object");
			}

    			var boundName = "bound:curry:" + core.util.Id.get(func);

			return context[boundName] || (
				context[boundName] = func.bind.apply(func, [context].concat(slice.call(arguments, 2)))
			);
		} : function(func, context) {
			return core.Function.bind(core.Function.curry.apply(this, [func].concat(slice.call(arguments, 2))), context);
		}
	});
	
})(window);

{'fraction_non_alphanumeric': 0.25254027261462203, 'fraction_numerical': 0.013382899628252789, 'mean_word_length': 3.7426556991774382, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2920246', 'n_tokens_mistral': 1526, 'n_tokens_neox': 1254, 'n_words': 278}