Eliminate duplicated code.
Add a currently very slow example as testcase.
Try longest tuplets first.