summary refs log tree commit diff
path: root/lib/attrsets.nix
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2022-05-10 06:52:20 +0200
committerRobert Hensing <robert@roberthensing.nl>2022-05-10 07:01:00 +0200
commit4d2237c841d5e670e9ac994be432db04f09fd537 (patch)
tree0477074a1bdbe0184d756219d575322ea9ea90d2 /lib/attrsets.nix
parentecc106108cc2fd868be1624607dc1065ccb67fd0 (diff)
downloadnixpkgs-4d2237c841d5e670e9ac994be432db04f09fd537.tar
nixpkgs-4d2237c841d5e670e9ac994be432db04f09fd537.tar.gz
nixpkgs-4d2237c841d5e670e9ac994be432db04f09fd537.tar.bz2
nixpkgs-4d2237c841d5e670e9ac994be432db04f09fd537.tar.lz
nixpkgs-4d2237c841d5e670e9ac994be432db04f09fd537.tar.xz
nixpkgs-4d2237c841d5e670e9ac994be432db04f09fd537.tar.zst
nixpkgs-4d2237c841d5e670e9ac994be432db04f09fd537.zip
lib.foldAttrs: Clarify example
Diffstat (limited to 'lib/attrsets.nix')
-rw-r--r--lib/attrsets.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/attrsets.nix b/lib/attrsets.nix
index 516fdd8d33f..5575e957702 100644
--- a/lib/attrsets.nix
+++ b/lib/attrsets.nix
@@ -248,7 +248,7 @@ rec {
   /* Apply fold functions to values grouped by key.
 
      Example:
-       foldAttrs (n: a: [n] ++ a) [] [{ a = 2; } { a = 3; }]
+       foldAttrs (item: acc: [item] ++ acc) [] [{ a = 2; } { a = 3; }]
        => { a = [ 2 3 ]; }
   */
   foldAttrs = op: nul: