mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
lib.mapAttrsRecursiveCond: Eliminate intermediate one intermediate variable environment
This commit is contained in:
parent
31f91738fb
commit
34fefe4e16
@ -731,14 +731,13 @@ rec {
|
||||
set:
|
||||
let
|
||||
recurse = path:
|
||||
let
|
||||
g =
|
||||
name: value:
|
||||
mapAttrs
|
||||
(name: value:
|
||||
if isAttrs value && cond value
|
||||
then recurse (path ++ [name]) value
|
||||
else f (path ++ [name]) value;
|
||||
in mapAttrs g;
|
||||
in recurse [] set;
|
||||
then recurse (path ++ [ name ]) value
|
||||
else f (path ++ [ name ]) value);
|
||||
in
|
||||
recurse [ ] set;
|
||||
|
||||
|
||||
/* Generate an attribute set by mapping a function over a list of
|
||||
|
Loading…
Reference in New Issue
Block a user