Add 12.nix

This commit is contained in:
NaiJi ✨ 2022-04-13 12:56:46 +00:00
parent 22a96b3ac7
commit c7a7329955
1 changed files with 14 additions and 0 deletions

14
12.nix Normal file
View File

@ -0,0 +1,14 @@
let
b = 1;
fu0 = (x: x);
fu1 = (x: y: x + y) 4;
fu2 = (x: y: (2 * x) + y);
in
rec {
ex00 = fu0 4; # must return 4
ex01 = (fu1) 1; # must return 5
ex02 = (fu2 3 ) 1; # must return 7
ex03 = (fu2 3 ); # must return <LAMBDA>
ex04 = ex03 1; # must return 7
ex05 = (n: x: (fu2 x n)) 1 3; # must return 7
}