forked from mirrors/nixpkgs
Replace fold by all because its more readable and shorter
This commit is contained in:
parent
fcbc4fe9ff
commit
53994036d3
|
@ -116,7 +116,7 @@ rec {
|
|||
attrsOf = elemType: mkOptionType {
|
||||
name = "attribute set of ${elemType.name}s";
|
||||
check = x: lib.traceValIfNot isAttrs x
|
||||
&& fold (e: v: v && elemType.check e) true (lib.attrValues x);
|
||||
&& all elemType.check (lib.attrValues x);
|
||||
merge = lib.zipAttrsWith (name: elemType.merge);
|
||||
iter = f: path: set: lib.mapAttrs (name: elemType.iter f (path + "." + name)) set;
|
||||
fold = op: nul: set: fold (e: l: elemType.fold op l e) nul (lib.attrValues set);
|
||||
|
|
Loading…
Reference in a new issue