% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mlmodel-utils.R
\name{null-default}
\alias{null-default}
\alias{\%||\%}
\title{Null default operator}
\usage{
x \%||\% y
}
\arguments{
\item{x, y}{Any R objects.}
}
\value{
The value of \code{x} if it is not \code{NULL}, otherwise the value of \code{y}.
}
\description{
Provides a convenient infix operator for replacing \code{NULL} values.
\verb{x \\\%||\\\% y} is equivalent to \code{if (is.null(x)) y else x}.
}
\examples{
NULL \%||\% "fallback"
list(a = 1) \%||\% list(b = 2)
}
