void forEach(
void action(E entry)
)

Call action with each entry in this linked list.

It's an error if action modify the linked list.

Source

/**
 * Call [action] with each entry in this linked list.
 *
 * It's an error if [action] modify the linked list.
 */
void forEach(void action(E entry)) {
  int modificationCount = _modificationCount;
  _LinkedListLink current = _next;
  while (!identical(current, this)) {
    action(current);
    if (modificationCount != _modificationCount) {
      throw new ConcurrentModificationError(this);
    }
    current = current._next;
  }
}