the above fucntions would get: capitalized "Return a copy with the first letter capitalized" ^ self withFirstLetterTransformed: [:value | value asUppercase ].
and withFirstCharacterDownshifted
withFirstCharacterLowercase?
"Return a copy with the first letter downShifted (in lower case)"
^ self withFirstLetterTransformed: [:value | value asLowercase ].
Well I also know that capitalized is a very "old" thing but the second name is more specific. So what about: withFistCharacterUpshifted .... as counterpart?
does not fly :)
we have first for accessing the first element of any collection but first: is not for setting the first element.
first:n yields the first n Elements of a collection.
That's not a good name then. firstElements:n would be a better name IMHO.
indeed.
And then we could have first: someValue and so we would have in the end:
result first: (aTranformBlock value: result first).
would change the first Element of "any" collection. AFAIKT Lisp has such a conventionâ¦
my first changes to not to any harm to existing Code, but of course changing the meaning of first: wouldâ¦.
Did you check what are the senders of first:? STef