Add 17.nix

This commit is contained in:
NaiJi ✨ 2022-04-14 10:27:44 +00:00
parent 9656e7e52c
commit 1585dc43f6
1 changed files with 9 additions and 0 deletions

9
17.nix Normal file
View File

@ -0,0 +1,9 @@
let
attrSetBonus = {f = {add = (x: y: x + y);
mul = (x: y: x * y);};
n = {one = 1; two = 2;};};
in
rec {
#Bonus: use only the attrSetBonus to solve this one
exBonus = 5 == attrSetBonus.f.add attrSetBonus.n.one ( attrSetBonus.f.add attrSetBonus.n.two attrSetBonus.n.two);
}