R/NoDefault.R

Defines functions is_nodefault

Documented in is_nodefault

#' @title Extra data type for "no default value"
#'
#' @description
#' Special new data type for no-default.
#' Not often needed by the end-user, mainly internal.
#'
#' * `NO_DEF`: Singleton object for type, used in [`Domain`] when no default is given.
#' * `is_nodefault()`: Is an object the 'no default' object?
#'
#' @name NO_DEF
#' @aliases NoDefault is_nodefault
NULL

#' @export
NO_DEF = structure(list(), class = "NoDefault") # nolint
is_nodefault = function(x) identical(x, NO_DEF)
mlr-org/phng documentation built on April 22, 2024, 4:34 p.m.