From 1585dc43f688fbf070a23ea9dbf3f9f86693a63b Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 14 Apr 2022 10:27:44 +0000 Subject: [PATCH] Add 17.nix --- 17.nix | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 17.nix diff --git a/17.nix b/17.nix new file mode 100644 index 0000000..7db57ea --- /dev/null +++ b/17.nix @@ -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); +} \ No newline at end of file