% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/50-ordered_sequence-ops.R
\name{peek_key}
\alias{peek_key}
\title{Peek First Element for One Key}
\usage{
peek_key(x, key)
}
\arguments{
\item{x}{An \code{ordered_sequence}.}

\item{key}{Query key.}
}
\value{
Matched element, or \code{NULL} when no matching key exists.
}
\description{
Returns the first element whose key equals \code{key}.
}
\details{
For duplicate keys, this returns the first element in stable sequence order.
}
\examples{
x <- ordered_sequence("a", "b", "c", keys = c(1, 2, 2))
peek_key(x, 2)
peek_key(x, 10)
}
