I have an array like so:
["marblecake", "also", "the", 1337]
I would like to get back a string which contains each element of the array prefixed by some specified string, then joined together by another specified string. For example,
["marblecake", "also", "the", 1337].join_with_prefix("%", "__")
should result in
# => %marblecake__%also__%the__%1337
How might I do this?