static bool matchTwoLists(IF2 pred, L l1, A[] l2) { int n = l(l1); if (n != l(l2)) false; for i to n: if (!pred.get(l1.get(i), l2[i])) false; true; }