remove(callbackOrIndex) {
    if (typeof callbackOrIndex !== 'function') {
      return this.removeByPosition(parseInt(callbackOrIndex, 10) || 0);
    }

    // find desired position to remove using #find
    const position = this.find((node, index) => {
      if (callbackOrIndex(node, index)) {
        return index;
      }
      return undefined;
    });

    if (position !== undefined) { // zero-based position.
      return this.removeByPosition(position);
    }

    return false;
  }
@deprecated use removeByNode or removeByPosition
Removes the first occurrence of the specified elementt
from this list, if it is present.
Runtime: O(n)
@param {any} callbackOrIndex callback or position index to remove