(Code WTF) Keywords: no keywords
Collection >> do: operation separatedBy: separator
"Evaluate the argument, operation,
for each of the receiver's elements, interspersed
with evaluations of the
argument, separator. The separator is first
evaluated after the first element, and is not
evaluated after the last element (i.e. it is not
evaluated at all if there are less than two elements)."
| sep |
"Switch to the real separator after first eval."
sep := [sep := separator].
self do: [:e |
operation value: e].
sep := nil.