Try using :type on the literal value "H" (notice the double quotes). What happens? Why?

Try using :type on the literal value 'Hello World' (notice the single quotes). What happens? Why?

"H" is a String with just one element.

'Hello World' is invalid because Chars consist of only one character.

Exercises

What are the types of the following functions? For any functions involving numbers, you can just pretend the numbers are Ints.

The negate function, which takes an Int and returns that Int with its sign swapped. For example, negate 4 = -4, and negate (-2) = 2

The (||) function, pronounced 'or', that takes two Bools and returns a third Bool which is True if either of the arguments were, and False otherwise.

A monthLength function which takes a Bool which is True if we are considering a leap year and False otherwise, and an Int which is the number of a month; and returns another Int which is the number of days in that month.