Functional Programming (H) - 2.12 - What do you know about Haskell?

1. What is wrong with this line of code, to return the number of characters typed by a user?

let x = getLine in length(x)

2. What is the type of this function?

f name = putStrLn ("hello " ++ name)

3. How do you find the type of a defined function f in ghci?

4. What is the difference between -> and <- in Haskell syntax?

5. Why do you think the generation and use of pseudo-random numbers might occur inside a monad?