In
computer science,
peek is an operation on certain
abstract data types, specifically sequential
collections such as
stacks and
queues, which returns the value of the top ("front") of the collection without removing the element from the collection. It thus returns the same value as operations such as "pop" or "dequeue", but does not modify the data.