% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/has_element.R
\name{has_element}
\alias{has_element}
\title{Check if an Object is Element of a List}
\usage{
has_element(.x, .y)
}
\arguments{
\item{.x}{(\code{list()} | atomic \code{vector()}).}

\item{.y}{(\code{any})\cr
Object to test for.}
}
\description{
Simply checks if a list contains a given object.
\itemize{
\item NB1: Objects are compared with identity.
\item NB2: Only use this on lists with complex objects, for simpler structures there are faster operations.
\item NB3: Clones of R6 objects are not detected.
}
}
\examples{
has_element(list(1, 2, 3), 1)
}
