% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/empty.R
\name{list_drop_empty}
\alias{list_drop_empty}
\title{Drop empty elements from a list}
\usage{
list_drop_empty(x)
}
\arguments{
\item{x}{A list.}
}
\description{
\code{list_drop_empty()} removes empty elements from a list. This includes \code{NULL}
elements along with empty vectors, like \code{integer(0)}. This is equivalent to,
but faster than, \code{vec_slice(x, list_sizes(x) != 0L)}.
}
\section{Dependencies}{

\itemize{
\item \code{\link[=vec_slice]{vec_slice()}}
}
}

\examples{
x <- list(1, NULL, integer(), 2)
list_drop_empty(x)
}
