From 76c7c1ad26d8ce7d6d579faadb47f074add2d59f Mon Sep 17 00:00:00 2001 From: NaiJi Date: Tue, 19 Apr 2022 20:37:58 +0000 Subject: [PATCH] Add '25.nix' --- 25.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 25.nix diff --git a/25.nix b/25.nix new file mode 100644 index 0000000..8342686 --- /dev/null +++ b/25.nix @@ -0,0 +1,11 @@ +with import {}; +let + func = x: y: assert (x==2) || abort "x has to be 2 or it won't work!"; x + y; + n = -1; # only modify this line +in + +assert (lib.isInt n) || abort "Type error since supplied argument is no int!"; + +rec { + ex00 = func (n+3) 3; +} \ No newline at end of file