add custom std/trivial.nix
This commit is contained in:
parent
212a85c045
commit
5126482fb4
2 changed files with 15 additions and 0 deletions
|
|
@ -1,9 +1,11 @@
|
||||||
{...} @ args: let
|
{...} @ args: let
|
||||||
attrs = import ./attrs.nix args;
|
attrs = import ./attrs.nix args;
|
||||||
lists = import ./lists.nix args;
|
lists = import ./lists.nix args;
|
||||||
|
trivial = import ./trivial.nix args;
|
||||||
in
|
in
|
||||||
attrs.mergeAttrsList [
|
attrs.mergeAttrsList [
|
||||||
# submodule is included directly to this module (ie self.myFunc)
|
# submodule is included directly to this module (ie self.myFunc)
|
||||||
attrs
|
attrs
|
||||||
lists
|
lists
|
||||||
|
trivial
|
||||||
]
|
]
|
||||||
|
|
|
||||||
13
nib/std/trivial.nix
Normal file
13
nib/std/trivial.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{...}: {
|
||||||
|
id = x: x;
|
||||||
|
|
||||||
|
min = x: y:
|
||||||
|
if x < y
|
||||||
|
then x
|
||||||
|
else y;
|
||||||
|
|
||||||
|
max = x: y:
|
||||||
|
if x > y
|
||||||
|
then x
|
||||||
|
else y;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue