I was driving today and I realized that join is just a form of reduce. Here’s some perl6:

1
2
3
sub join(Str $string, @array) {
   @array.reduce: { $^a ~ $string ~ $^b }
}

It works exactly as expected.