function isArray(testObject) {   
	return (
		testObject && 
		!(testObject.propertyIsEnumerable('length')) && 
		typeof testObject === 'object' && 
		typeof testObject.length === 'number'
	);
}

/*
returns a new array where the element is removed
*/
function array_remove(ary, i) {
	return ary.slice(0,i).concat( ary.slice(i+1) );
}


/*
same as ruby's Hash.fetch method
*/
function dictionary_fetch(dict, key, default_value) {
	return (key in dict) ? dict[key] : default_value;
}

