Negative strings
Monday, July 31st, 2006One often wants to place separators between substrings.
For instance commas between a list of words.
The code has to detect whether it is adding the last element to avoid adding a final comma.
It would simpler if you could subtract a string at the end.
(- “, “) + “, a, b, c, d” = “a, b, c, d”
“a, b, c, d, ” - “, ” = “a, b, c, d”
Non-commutative!