From 3b6169f87be45c77ec4b56d118a5e2c718ff3f2b Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Fri, 22 Sep 2023 12:22:04 +0200 Subject: lib.lists.foldl': Make strict in the initial accumulator To maintain backwards compatibility, this can't be changed in the Nix language. We can however ensure that the version Nixpkgs has the more intuitive behavior. --- lib/attrsets.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/attrsets.nix') diff --git a/lib/attrsets.nix b/lib/attrsets.nix index 77e36d3271f76..11932c05dd29b 100644 --- a/lib/attrsets.nix +++ b/lib/attrsets.nix @@ -392,7 +392,7 @@ rec { foldlAttrs :: ( a -> String -> b -> a ) -> a -> { ... :: b } -> a */ foldlAttrs = f: init: set: - foldl' + builtins.foldl' (acc: name: f acc name set.${name}) init (attrNames set); -- cgit 1.4.1