peek_front: Peek at the Front Element

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

peek_frontR Documentation

Peek at the Front Element

Description

Returns the first element without modifying the sequence.

Usage

peek_front(x)

Arguments

x

A flexseq.

Details

Returns the payload element without modifying x.

Value

First element, or NULL when x is empty.

Examples

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

peek_front(flexseq())

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