% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/60-interval_index-query-api.R
\name{peek_within}
\alias{peek_within}
\title{Peek First Interval Within a Query Interval}
\usage{
peek_within(x, start, end, bounds = NULL)
}
\arguments{
\item{x}{An \code{interval_index}.}

\item{start}{Query interval start.}

\item{end}{Query interval end.}

\item{bounds}{Optional boundary override. One of \code{"[)"}, \code{"[]"}, \code{"()"}, \code{"(]"}.}
}
\value{
The payload value from the first match, or \code{NULL} on no match.
}
\description{
Peek First Interval Within a Query Interval
}
\details{
Returns the first match in canonical interval order. Use \code{\link[=peek_all_within]{peek_all_within()}}
to retrieve all matches as an \code{interval_index} slice.
}
\examples{
ix <- interval_index("a", "b", "c", start = c(1, 2, 4), end = c(6, 3, 5))
peek_within(ix, 1, 4)
}
