cascade-functions/join-string.nix

13 lines
221 B
Nix
Raw Normal View History

2022-10-16 22:46:24 +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