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
|
||||
attrs = import ./attrs.nix args;
|
||||
lists = import ./lists.nix args;
|
||||
trivial = import ./trivial.nix args;
|
||||
in
|
||||
attrs.mergeAttrsList [
|
||||
# submodule is included directly to this module (ie self.myFunc)
|
||||
attrs
|
||||
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