code: private Optional<ImmutableSubstitution<ImmutableTerm>> computeDirectedMGUOfTwoFunctionalTerms(
              ImmutableFunctionalTerm sourceTerm, ImmutableFunctionalTerm targetTerm) {
          /*
           * Function symbol equality
           */
          if (!sourceTerm.getFunctionSymbol().equals(
                  targetTerm.getFunctionSymbol())) {
              return Optional.empty();
          }
  
          ImmutableList<? extends ImmutableTerm> sourceChildren = sourceTerm.getTerms();
          ImmutableList<? extends ImmutableTerm> targetChildren = targetTerm.getTerms();
  
          int childNb = sourceChildren.size();
          if (targetChildren.size() != childNb) {
              return Optional.empty();
          }
  
          final ImmutableList.Builder<TermPair> pairBuilder = ImmutableList.builder();
          for (int i=0; i < childNb; i++) {
              /*
               * Recursive
               */
              Optional<ImmutableSubstitution<ImmutableTerm>> optionalChildTermUnifier =
                      computeDirectedMGU(sourceChildren.get(i), targetChildren.get(i));
  
              /*
               * If the unification of one pair of sub-terms is not possible,
               * no global unification is possible.
               */
              if (!optionalChildTermUnifier.isPresent()) {
                  return Optional.empty();
              }
  
              /*
               * Adds all its pairs
               */
              pairBuilder.addAll(convertIntoPairs(optionalChildTermUnifier.get()));
          }
  
          return unifyPairs(pairBuilder.build());
      }
docs: TODO: explain