1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 14:21:48 +02:00

Add concatStringsSep as a primop

This fixes the quadratic behaviour of concatStrings/concatStringsSep
in Nixpkgs.
This commit is contained in:
Eelco Dolstra 2015-07-24 02:31:58 +02:00
parent cb4320c1a0
commit 2e8fd4c5cd
3 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1 @@
[ "" "foobarxyzzy" "foo, bar, xyzzy" "foo" "" ]

View file

@ -0,0 +1,8 @@
with builtins;
[ (concatStringsSep "" [])
(concatStringsSep "" ["foo" "bar" "xyzzy"])
(concatStringsSep ", " ["foo" "bar" "xyzzy"])
(concatStringsSep ", " ["foo"])
(concatStringsSep ", " [])
]