9 lines
196 B
Nix
9 lines
196 B
Nix
|
with import <nixpkgs> { };
|
||
|
let
|
||
|
attrSet = {c = 3; a = 1; b = 2;};
|
||
|
|
||
|
attrValues = s: map (field: s.${field}) (builtins.attrNames s);
|
||
|
in
|
||
|
rec {
|
||
|
solution = attrValues attrSet; #should be [1 2 3]
|
||
|
}
|