code: public Expression foldBooleanConditions(List<Function> booleanAtoms) {
          if (booleanAtoms.length() == 0)
              return TRUE_EQ;
  
          Expression firstBooleanAtom = convertOrCastIntoBooleanAtom( booleanAtoms.head());
  
          return booleanAtoms.tail().foldLeft(new F2<Expression, Function, Expression>() {
              @Override
              public Expression f(Expression previousAtom, Function currentAtom) {
                  return termFactory.getFunctionAND(previousAtom, currentAtom);
              }
          }, firstBooleanAtom);
      }
docs: Folds a list of boolean atoms into one AND(AND(...)) boolean atom.