<commit_before>/** Installs array, collection, and function methods from UndescoreJS to the Array prototype for more elegant syntax. 
	@see		http://documentcloud.github.com/underscore
	@remarks	Includes all array and collection functions except: intersection, union, zip, range, toArray
*/

/** Returns a new array containing the elements of the given array shifted n spaces to the left, wrapping around the end. */
var rotate = function(arr, n) {
	var output = [];<commit_msg>adding missing functions to do install<commit_after>/** Installs array, collection, and function methods from UndescoreJS to the Array prototype for more elegant syntax. 
	@see		http://documentcloud.github.com/underscore
	@remarks	Includes all array and collection functions except: intersection, union, zip, range, toArray
*/

/** Returns the in-bounds index of the given index for the array, supports negative and out-of-bounds indices. 
		@private
*/
var circ = function(arr, i) {

	// return first index if i is null or undefined
	if(i === undefined || i === null) {
		return arr[0];
	}

	// one modulus to get in range, another to eliminate negative
	return (i % arr.length + arr.length) % arr.length;
};

/** Indexes into an array, supports negative indices. */
var index = function(arr, i) {
	return arr[circ(arr, i)];
};

/** Returns a new array containing the elements of the given array shifted n spaces to the left, wrapping around the end. */
var rotate = function(arr, n) {
	var output = [];
{'fraction_non_alphanumeric': 0.09925725860904794, 'fraction_numerical': 0.0006752194463200541, 'mean_word_length': 4.181818181818182, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7206981', 'n_tokens_mistral': 413, 'n_tokens_neox': 397, 'n_words': 188}