code: function constructSortingFunction(comp) {
  		var funcStr = 'function(arr) { return arr.sort(%comp%); };',
  			func;
  		funcStr = funcStr.replace('%comp%', comp.toString());
  		
  		// Eval is evil but necessary in this case
  		eval('func = '+ funcStr);
  		return func;
  	}
docs: Construct a sorting function for a specific comparator