CASCADE/functions/join-string.nix

13 lines
221 B
Nix
Raw Normal View History

2022-09-27 16:07:58 +00:00
with builtins;
let join' = join': sep: sl:
if sl == []
then ""
else if length sl == 1
then head sl
else "${head sl}${sep}${join' join' sep (tail sl)}";
join = join' join';
in
join