git.iko.soy/typeable/nixpkgs
on master help sign in
flatten: drastically improve performance, see #17626
commitebffa9fd06af825d161d9da8d43f93ddb6b1f313 authorDomen Kožar <domen@dev.si> dateWed 10 Aug 2016, 12:02 (10 years ago) parent8955dc5
1 file changed+1−1
lib/lists.nix+1−1
lib/lists.nix+1−1
@@ -89,7 +89,7 @@ rec {
8989 */
9090 flatten = x:
9191 if isList x
92− then foldl' (x: y: x ++ (flatten y)) [] x
92+ then concatMap (y: flatten y) x
9393 else [x];
9494
9595 /* Remove elements equal to 'e' from a list. Useful for buildInputs.