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