code: private ImmutableTerm getNestedConcat(String str) {
          List<ImmutableTerm> terms;
          terms = addToTermsList(str);
          if (terms.size() == 1) {
              return terms.get(0);
          }
  
          ImmutableFunctionalTerm f = termFactory.getImmutableFunctionalTerm(ExpressionOperation.CONCAT, terms.get(0), terms.get(1));
          for (int j = 2; j < terms.size(); j++) {
              f = termFactory.getImmutableFunctionalTerm(ExpressionOperation.CONCAT, f, terms.get(j));
          }
          return f;
      }
docs: in case of more than two terms need to be concatted