From ebffa9fd06af825d161d9da8d43f93ddb6b1f313 Mon Sep 17 00:00:00 2001 From: Domen Kožar Date: Wed, 10 Aug 2016 12:02:58 +0200 Subject: flatten: drastically improve performance, see #17626 --- lib/lists.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/lists.nix b/lib/lists.nix index 6712e5cc93f80..78ffa753ac338 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -89,7 +89,7 @@ rec { */ flatten = x: if isList x - then foldl' (x: y: x ++ (flatten y)) [] x + then concatMap (y: flatten y) x else [x]; /* Remove elements equal to 'e' from a list. Useful for buildInputs. -- cgit 1.4.1