Merge pull request #292938 from adisbladis/mapattrsrecursivecond-env

lib.mapAttrsRecursiveCond: Eliminate intermediate one intermediate variable environment
This commit is contained in:
Silvan Mosberger 2024-03-06 19:40:52 +01:00 committed by GitHub
commit 2dc95cded0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -746,14 +746,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