HomeManualTopicsTypesSymbols

std::peek

returns the last item of a collection without removing it

Parameter

collection
the collection to be analyzed

Result

item
the last item of collection

Topics

Strings

Lists

See also

std::pop remove and return the last item of a collection
std::drop removes the last item of a collection without returning it
std::push add a single item at the end of a collection
std::put adds a single item at the front of a collection

Implemented by

std_types::list returns the last item of a non-empty list