code: private List<List<UnitFactor>> getPaths(Unit from, Unit to, Set<Unit> seen) {
      List<List<UnitFactor>> result = new ArrayList<>();
  
      // See if there is a direct path and return it.
      UnitFactor factor = get(from, to);
      if (factor != null) {
        result.add(list(factor));
        return result;
      }
  
      // Prune the search space..
      seen.add(from);
  
      // Scan each base for the 'from' unit, trying to find a complete path
      // to the 'to' unit. Collect all of the paths.
      for (Unit base : getBases(from)) {
        if (seen.contains(base)) {
          continue;
        }
  
        // Create this link in the chain.
        factor = get(from, base);
  
        // Scan another level deeper, starting from 'base' unit.
        for (List<UnitFactor> factors : getPaths(base, to, seen)) {
          // If we found a complete path, add it..
          if (!factors.isEmpty()) {
            // Insert the current factor into the chain and add to the result set.
            factors.add(0, factor);
            result.add(factors);
          }
        }
      }
      return result;
    }
docs: Search into the mapping to find lists of factors that can convert
  the 'from' unit into the 'to' unit.  For example, to convert MILE
  to KILOMETER, we might find the path:
  
  [(MILE -> INCH), (INCH -> METER), (METER -> KILOMETER)]