I want pass a list as parameter to a function which multiply every element of this list by 3. I has to use recursion (I know how to do it) and map function (there is a problem).
I'm trying passing a list as a parameter as I've seen in other posts but it isn't working.
fun x = 3 * x + 1
mult :: [Int] -> [Int]
mult [a] = map fun [a]
Code I tried shows: Exception: x: Non-exhaustive patterns in function mult