function attachParts(parts, handler, target, placeholders = []) {
  let part;

  do {
    part = parts.shift();
  } while (parts.length > 0 && part.length === 0);

  if (part && part[0] === ":") {
    placeholders.push(part.substring(1));
    part = "*";
  }

  const next = target.getNext(part);

  if (parts.length > 0) {
    return attachParts(parts, handler, next, placeholders);
  }

  if (target.exists(part)) {
    return false;
  }

  next.handler = handler;
  next.placeholders = placeholders;

  return true;
}
@param {Array<string>} parts
@param {Function} routeHandler
@param {RoutePart} target
@param {Array<string>} placeholders
@returns {Boolean} If false, failed to attach because of a duplicate