nt/nib/std/trivial.nix
2026-01-15 13:34:02 +10:00

23 lines
241 B
Nix

{...}: let
inherit
(builtins)
warn
;
in {
id = x: x;
min = x: y:
if x < y
then x
else y;
max = x: y:
if x > y
then x
else y;
warnIf = cond: msg:
if cond
then warn msg
else x: x;
}