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[] triplet = new int[] {t.get(0), t.get(1), t.get(2)}; CheckLSFRTriplet checker = new(bits, triplet); if (checker!) { tripletFound(triplet); ret triplet; } } null; } L getAll() { init(); new L workingTriplets; int[] triplet; while ((triplet = next()) != null) workingTriples.add(triplet); ret workingTriplets; } }