warnIf
lib.trivial.warnIf
Docs pulled from | This Revision | 4 days ago
warnIf condition message value
Like warn, but only warn when the first argument is true.
Inputs
condition(Boolean)-
trueto 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;