Write a function capitalize(s) that produces a capitalized version of string s. For example, capitalize("dog") = "Dog".

If string s does not begin with a lower case letter then capitialize(s) should just produce the same string s as its answer. For example, capitalize("Dog") = "Dog".

(Hint. There is a predefined function toUpper(c) that takes a character c and produces an upper case version of c (or produces c itself if c is not a lower case letter). For example, toUpper('d') = 'D' and toUpper('D') = 'D'. Also, you will want to use $ to convert a character to a string. For example, $('D') = "D".)

 

    [Language: Cinnameg  Kind: function definition*]

(*You can define more than one function if you put a semicolon between definitions (but not between cases of one definition). Be sure to define a function before you use it.)