add trivial.warnIf
This commit is contained in:
parent
8c57b7d2d3
commit
f6c33420ea
1 changed files with 11 additions and 1 deletions
|
|
@ -1,4 +1,9 @@
|
|||
{...}: {
|
||||
{...}: let
|
||||
inherit
|
||||
(builtins)
|
||||
warn
|
||||
;
|
||||
in {
|
||||
id = x: x;
|
||||
|
||||
min = x: y:
|
||||
|
|
@ -10,4 +15,9 @@
|
|||
if x > y
|
||||
then x
|
||||
else y;
|
||||
|
||||
warnIf = cond: msg:
|
||||
if cond
|
||||
then warn msg
|
||||
else x: x;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue