mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 22:51:22 +00:00
attrsets: clarify that mapAttrs maps over *leaf* attrs
This commit is contained in:
parent
2d23194179
commit
ee00af7a32
@ -480,8 +480,10 @@ rec {
|
||||
|
||||
|
||||
/* Like `mapAttrs`, except that it recursively applies itself to
|
||||
attribute sets. Also, the first argument of the argument
|
||||
function is a *list* of the names of the containing attributes.
|
||||
the *leaf* attributes of a potentially-nested attribute set:
|
||||
the second argument of the function will never be an attrset.
|
||||
Also, the first argument of the argument function is a *list*
|
||||
of the names of the containing attributes.
|
||||
|
||||
Example:
|
||||
mapAttrsRecursive (path: value: concatStringsSep "-" (path ++ [value]))
|
||||
|
Loading…
Reference in New Issue
Block a user