public static int search(int size, F1<Integer, Integer> disF) {
		int index = -1;
		for (int from = 0, to = size; ; ) {
			if (to<=from) return -1;
			
			index = ((to-from) / 2) + from;
			Integer result = disF.e(index);
			
			if (result== 0) {
				// found
				break;
			} else if (result < 0) { // We are behind
				from = index + 1;
			} else { // result > 0
				to = index;
			}
		}
		return index;
	}