q3 a (b:[]) = a b
q3 a (b1:b2:bs) = q3 a (b2:bs)
It seems like a doesn't have any influence to the function. My understanding is that this function takes two parameters, where the second one is a list, and returns the first parameter and the tail of the second list.
However, I'm confused by the type:
q3 :: (t1 -> t) -> [t1] -> t
How is a relevant to t1 -> t?
Thank you.
q3 f [x] = f x; q3 f (_:xs) = q3 f xs, which is exactly the same. - leftaroundabout