code: public List<Type> union(List<Type> cl1, List<Type> cl2, BiPredicate<Type, Type> shouldSkip) {
          if (cl1.isEmpty()) {
              return cl2;
          } else if (cl2.isEmpty()) {
              return cl1;
          } else if (shouldSkip.test(cl1.head, cl2.head)) {
              return union(cl1.tail, cl2.tail, shouldSkip).prepend(cl1.head);
          } else if (cl1.head.tsym.precedes(cl2.head.tsym, this)) {
              return union(cl1.tail, cl2, shouldSkip).prepend(cl1.head);
          } else if (cl2.head.tsym.precedes(cl1.head.tsym, this)) {
              return union(cl1, cl2.tail, shouldSkip).prepend(cl2.head);
          } else {
              // unrelated types
              return union(cl1.tail, cl2, shouldSkip).prepend(cl1.head);
          }
      }
docs: Form the union of two closures