nixpkgs-manual: lib.attrsets.mapAttrsToList returns a list (#122179)
This commit is contained in:
parent
06efb08ec4
commit
3452a739d1
|
@ -855,7 +855,7 @@ lib.attrsets.mapAttrs' (name: value: lib.attrsets.nameValuePair ("foo_" + name)
|
||||||
<title><function>lib.attrsets.mapAttrsToList</function></title>
|
<title><function>lib.attrsets.mapAttrsToList</function></title>
|
||||||
|
|
||||||
<subtitle><literal>mapAttrsToList :: (String -> Any -> Any) ->
|
<subtitle><literal>mapAttrsToList :: (String -> Any -> Any) ->
|
||||||
AttrSet -> Any</literal>
|
AttrSet -> [Any]</literal>
|
||||||
</subtitle>
|
</subtitle>
|
||||||
|
|
||||||
<xi:include href="./locations.xml" xpointer="lib.attrsets.mapAttrsToList" />
|
<xi:include href="./locations.xml" xpointer="lib.attrsets.mapAttrsToList" />
|
||||||
|
|
|
@ -243,6 +243,10 @@ rec {
|
||||||
/* Call a function for each attribute in the given set and return
|
/* Call a function for each attribute in the given set and return
|
||||||
the result in a list.
|
the result in a list.
|
||||||
|
|
||||||
|
Type:
|
||||||
|
mapAttrsToList ::
|
||||||
|
(String -> a -> b) -> AttrSet -> [b]
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
mapAttrsToList (name: value: name + value)
|
mapAttrsToList (name: value: name + value)
|
||||||
{ x = "a"; y = "b"; }
|
{ x = "a"; y = "b"; }
|
||||||
|
|
Loading…
Reference in New Issue