Haskell/Solutions/Type basics
| Exercises |
|---|
|
- "H" is a
Stringwith just one element. - 'Hello World' is invalid because
Chars consist of only one character.
| Exercises |
|---|
|
Finding types for functions is a basic Haskell skill that you should become very familiar with. What are the types of the following functions?
For any functions hereafter involving numbers, you can just assume the numbers are Ints.
|
negate :: Int -> Int|| :: Bool -> Bool -> BoolmonthLength :: Bool -> Int -> Int
And in the second round:
f :: Bool -> Bool -> Boolg :: Int -> Int