srecord noeq FindAllLSFRTriplets(int bits) { event tripletFound(int[] triplet); ItIt> iterator; void init { iterator if null = outerProduct(repF(3, -> virtualCountList(1, bits))); } // return next working triplet or null if end of search int[] next() { for (L t : iterator) { int[] triple = new int[] {t.get(0), t.get(1), t.get(2)}; CheckLSFRTriplet checker = new(bits, triple); if (checker!) { tripletFound(triple); ret triplet; } } null; } L get() { init(); new L workingTriples; int[] triple; while ((triple = next()) != null) workingTriples.add(triple); ret workingTriples; } }