function mapProperty (objectList, property) {
   var result = new Array ();
   for (i in objectList) if (objectList[i]) result[result.length] = objectList[i][property];
   return result;
}

function max_of_list (list) {
  result = null;
  for (i in list)
   {if (!result) {result = list[i]} else {result = Math.max(result, list[i])};}
  return result;
}

function compareNumbers(a, b) {
   return a - b
}

function always_true () { return true }

function median (list) {
  temp = new Array(list.length);
  i = 0;
  for (index in list) {temp[i++] = list[index]};
  temp.sort(compareNumbers);
  if (Math.floor(temp.length/2)*2 == temp.length) // even
   {return ((temp[temp.length/2] +
             temp[(temp.length/2)-1])
            / 2)}
  else {return temp[Math.floor(temp.length/2)]}
}