peek_back: Peek at the Back Element

View source: R/30-api-flexseq-ends.R

peek_backR Documentation

Peek at the Back Element

Description

Returns the last element without modifying the sequence.

Usage

peek_back(x)

Arguments

x

A flexseq.

Details

Returns the payload element without modifying x.

Value

Last element, or NULL when x is empty.

Examples

x <- flexseq("a", "b", "c")
peek_back(x)

peek_back(flexseq())

Immutables documentation built on April 29, 2026, 1:06 a.m.