"Might be negative pattern in Perl with its join() and map() builtins, but assuming you happen to be forced to write code is a language that does not provide anything similar ..." . . . .