code: public List<Type> insert(List<Type> cl, Type t, BiPredicate<Type, Type> shouldSkip) {
          if (cl.isEmpty()) {
              return cl.prepend(t);
          } else if (shouldSkip.test(t, cl.head)) {
              return cl;
          } else if (t.tsym.precedes(cl.head.tsym, this)) {
              return cl.prepend(t);
          } else {
              // t comes after head, or the two are unrelated
              return insert(cl.tail, t, shouldSkip).prepend(cl.head);
          }
      }
docs: Insert a type in a closure