Add '25.nix'

This commit is contained in:
NaiJi ✨ 2022-04-19 20:37:58 +00:00
parent f9978f6ec8
commit 76c7c1ad26
1 changed files with 11 additions and 0 deletions

11
25.nix Normal file
View File

@ -0,0 +1,11 @@
with import <nixpkgs> {};
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;
}