static Matrix lambdaMapLike mapMatrix(IF1 f, Matrix m) { if (m == null) null; class MappedMatrix extends AbstractMatrix { *() { super(m.getWidth(), m.getHeight()); } public B get(int x, int y) { ret f.get(m.get(x, y)); } public void set(int x, int y, B a) { unimplemented(); } } ret new MappedMatrix; }