static int[] intArrayFromFunction(int n, IF1_IntToInt f) { int[] array = new[n]; for i to n: array[i] = f.get(i); ret array; }