Add '18.nix'

This commit is contained in:
NaiJi ✨ 2022-04-15 12:53:48 +00:00
parent 1585dc43f6
commit c39c67ea01
1 changed files with 15 additions and 0 deletions

15
18.nix Normal file
View File

@ -0,0 +1,15 @@
let
x = { a="bananas"; b= "pineapples"; };
y = { a="kakis"; c ="grapes";};
z = { a="raspberrys"; c= "oranges"; };
func = {a, b, c ? "another secret ingredient"}: "A drink of: " +
a + ", " + b + " and " + c;
in
rec {
ex00=func ( x );
# hit 'run', you need the output to solve this!
ex01=func (y // x);
ex02=func (x // { c="lychees";});
ex03=func (z // x // z);
}