nixpkgs-manual: lib.attrsets.mapAttrsToList returns a list (#122179)

wip/little-gl
Erlend Pedersen 3 years ago committed by GitHub
parent 06efb08ec4
commit 3452a739d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      doc/functions/library/attrsets.xml
  2. 4
      lib/attrsets.nix

@ -855,7 +855,7 @@ lib.attrsets.mapAttrs' (name: value: lib.attrsets.nameValuePair ("foo_" + name)
<title><function>lib.attrsets.mapAttrsToList</function></title>
<subtitle><literal>mapAttrsToList :: (String -> Any -> Any) ->
AttrSet -> Any</literal>
AttrSet -> [Any]</literal>
</subtitle>
<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
the result in a list.
Type:
mapAttrsToList ::
(String -> a -> b) -> AttrSet -> [b]
Example:
mapAttrsToList (name: value: name + value)
{ x = "a"; y = "b"; }

Loading…
Cancel
Save