1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 02:43:54 +02:00

* New built-in function `builtins.attrNames' that returns the

names of the attributes in an attribute set.
This commit is contained in:
Eelco Dolstra 2006-12-12 16:14:31 +00:00
parent 5e6699188f
commit 1a7e88bbd9
4 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1 @@
Str("newxfoonewxy",[])

View file

@ -0,0 +1,11 @@
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