diff options
author | Robert Hensing <robert@roberthensing.nl> | 2022-05-10 06:52:20 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2022-05-10 07:01:00 +0200 |
commit | 4d2237c841d5e670e9ac994be432db04f09fd537 (patch) | |
tree | 0477074a1bdbe0184d756219d575322ea9ea90d2 /lib/attrsets.nix | |
parent | ecc106108cc2fd868be1624607dc1065ccb67fd0 (diff) |
lib.foldAttrs: Clarify example
Diffstat (limited to 'lib/attrsets.nix')
-rw-r--r-- | lib/attrsets.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/attrsets.nix b/lib/attrsets.nix index 516fdd8d33fdd..5575e9577029a 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: |