static L listFromFunction(int n, IF1 f) { ret new RandomAccessAbstractList() { public int size() { ret n; } public A get(int i) { ret f.get(i); } }; }