From e7549b96ad013da56e990440bb58986683d80d7c Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Fri, 12 Oct 2018 14:51:46 -0400 Subject: nixpkgs docs: finish up mapAttrsRecursive --- doc/functions/library/attrsets.xml | 82 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) (limited to 'doc/functions') diff --git a/doc/functions/library/attrsets.xml b/doc/functions/library/attrsets.xml index 6f23e267bab2..5d8182cc6097 100644 --- a/doc/functions/library/attrsets.xml +++ b/doc/functions/library/attrsets.xml @@ -966,5 +966,87 @@ lib.attrsets.mapAttrsToList (name: value: "${name}=${value}") itself to attribute sets. Also, the first argument of the argument function is a list of the names of the containing attributes. + + + + + f + + + + [ String ] -> Any -> Any + + + Given a list of attribute names and value, return a new value. + + + + + name_path + + + + The list of attribute names to this value. + + + For example, the name_path for the + example string in the attribute set { foo + = { bar = "example"; }; } is [ "foo" "bar" + ]. + + + + + + value + + + + The attribute's value. + + + + + + + + + set + + + + The attribute set to recursively map over. + + + + + + + A contrived example of using <function>lib.attrsets.mapAttrsRecursive</function> + { + n = { + a = "n-a-A"; + m = { + b = "n-m-b-B"; + c = "n-m-c-C"; + }; + }; + d = "d-D"; + } + ]]> + -- cgit 1.4.1