function distance(x1,y1,x2,y2){ return Math.sqrt(Math.pow(x1-x2,2)+Math.pow(y1-y2,2)); } function index_in_array(the_arr,to_find){ var i = 0; while(i < the_arr.length){ if(the_arr[i]+0 === to_find){ return the_arr[i]; } else{ i++; } } } function matches_pattern(arr,pattern){ if(pattern.length !== arr.length){ return false; } else{ var i = 0; while(i " + b; } else{ return "(> "+a+" "+b+")"; } } function indent_line(line,number_of_indents){ var i = 0; while(i < number_of_indents){ line = " "+line; i++; } return line; }