diff options
Diffstat (limited to 'pkgs/lib/default.nix')
-rw-r--r-- | pkgs/lib/default.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix index b7087a57aba5..cac34c267190 100644 --- a/pkgs/lib/default.nix +++ b/pkgs/lib/default.nix @@ -38,6 +38,10 @@ rec { ++ (intersperse separator (tail list)); + concatStringsSep = separator: list: + concatStrings (intersperse separator list); + + # Flatten the argument into a single list; that is, nested lists are # spliced into the top-level lists. E.g., `flatten [1 [2 [3] 4] 5] # == [1 2 3 4 5]' and `flatten 1 == [1]'. |