Add '32.nix'

This commit is contained in:
NaiJi ✨ 2022-04-27 05:56:57 +00:00
parent 01be02f4cc
commit 8c8f645473
1 changed files with 9 additions and 0 deletions

9
32.nix Normal file
View File

@ -0,0 +1,9 @@
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]
}