List of words

Hannah Schroeter uk1o@rz.uni-karlsruhe.de
Thu, 3 May 2001 00:44:54 +0200


Hello!

On Wed, May 02, 2001 at 01:42:55AM -0700, Ashley Yakeley wrote:
> At 2001-05-02 01:34, Hannah Schroeter wrote:

> >capitalize (c:cs) = toUpper c : cs

> >capitalizeList = map capitalize

> ...or if you prefer...

> capitalizeList :: [String] -> [String]
> capitalizeList = map (map toUpper)

I understood "capitalize" as toUpper only the *first* character of a
string. Your capitalizeList at least isn't denotationally the same
as mine.

hannahCapitalizeList ["this", "is", "a", "fox"] ===
  ["This", "Is", "A", "Fox"]

ashleyCapitalizeList ["this", "is", "a", "fox"] ===
  ["THIS", "IS", "A", "FOX"]

Kind regards,

Hannah.