nt/nib/std/trivial.nix

24 lines
241 B
Nix
Raw Normal View History

2026-01-15 13:34:02 +10:00
{...}: let
inherit
(builtins)
warn
;
in {
2025-12-18 11:54:08 +10:00
id = x: x;
min = x: y:
if x < y
then x
else y;
max = x: y:
if x > y
then x
else y;
2026-01-15 13:34:02 +10:00
warnIf = cond: msg:
if cond
then warn msg
else x: x;
2025-12-18 11:54:08 +10:00
}