warnIfNot
lib.warnIfNot
Docs pulled from | This Revision | 10 minutes ago
warnIfNot
condition
message
value
Like warnIf
, but negated: warn if the first argument is false
.
Inputs
condition
-
false
to trigger the warning before continuing withval
. message
-
Warning message to print before evaluating
value
. value
-
Value to return as-is.
Type
Boolean -> String -> a -> a
Noogle detected
Implementation
The following is the current implementation of this function.
warnIfNot = cond: msg: if cond then x: x else warn msg;