You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
414 B
Nix

let
attrSet = {x = "a"; y = "b"; b = {t = true; f = false;};};
attrSet.c = 1;
attrSet.d = null;
attrSet.e.f = "g";
in
rec {
#boolean
ex0 = attrSet.b.t;
#equal
ex01 = "a" == attrSet.x;
#unequal
ex02 = !("b" != attrSet.y );
#and/or/neg
ex03 = ex01 && !ex02 || ! attrSet.b.f;
#implication
ex04 = true -> attrSet.b.t;
#contains attribute
ex05 = attrSet ? x;
ex06 = attrSet.b ? f;
}