solutions/A Tour of Nix/21.nix

14 lines
293 B
Nix
Raw Normal View History

2024-04-16 19:13:00 -04:00
let
attrSet = {x = "a"; y = "b"; b = {t = true; f = false;};};
attrSet.c = 1;
attrSet.d = 2;
attrSet.e.f = "g";
list1 = [attrSet.c attrSet.d];
list2 = [attrSet.x attrSet.y];
in
{
#List concatenation.
ex0 = ["a" "b" 1 2] == [ attrSet.x attrSet.y ] ++ [attrSet.c attrSet.d ];
}