feat(sterni/nix/int): add sum function
Change-Id: I7c3109b27ba91c848fd8b64d979d5e3c5c4583aa Reviewed-on: https://cl.tvl.fyi/c/depot/+/6944 Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
This commit is contained in:
parent
81fadbe6eb
commit
0025a6fd64
1 changed files with 3 additions and 0 deletions
|
@ -100,6 +100,8 @@ let
|
|||
|
||||
inRange = a: b: x: x >= a && x <= b;
|
||||
|
||||
sum = builtins.foldl' (a: b: a + b) 0;
|
||||
|
||||
in
|
||||
{
|
||||
inherit
|
||||
|
@ -122,5 +124,6 @@ in
|
|||
toHex
|
||||
fromHex
|
||||
inRange
|
||||
sum
|
||||
;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue