isFirst method

bool isFirst(
  1. T element
)

Determine whether the element is the first element of the collection

Implementation

bool isFirst(T element) {
  if (isEmpty) return false;
  return first == element;
}