lix/tests/lang/eval-okay-attrnames.nix
Eelco Dolstra 1a7e88bbd9 * New built-in function `builtins.attrNames' that returns the
names of the attributes in an attribute set.
2006-12-12 16:14:31 +00:00

11 lines
217 B
Nix

with import ./lib.nix;
let
attrs = {y = "y"; x = "x"; foo = "foo";} // rec {x = "newx"; bar = x;};
names = builtins.attrNames attrs;
values = map (name: builtins.getAttr name attrs) names;
in concat values