code: function mapLastPart(mapper, separator) {
    return str => {
      const idx = str.lastIndexOf(separator);
      const mapped = mapper(str.slice(idx + separator.length));
      return str.slice(0, idx + separator.length) + mapped;
    };
  }
docs: Returns a function that splits the inputs string into pieces using `separator`, only calls `mapper` for the last part and concatenates the string back together. If no separators are found, `mapper` is called for the entire string.