If first parameter is taken by the function first as function application is left-associative, for example:
drop 2 [1,2,3,4]
result: [3,4]
is equivalent to
(drop 2) [1,2,3,4]
same result: [3,4]
Here my question is, if the type signature is right-associative, which means, things in right side evaluate first, in this case, it's gonna be as follows, as the first parameter is first taken by the function:
drop :: [1,2,3,4] -> (2 -> [3,4])
It shouldn't have been as follows, right?
drop :: Int -> ([a] -> [a])
drop :: 2 -> ([1,2,3,4] -> [3,4])
So, why does it take the second parameter first in type signature of the function instead of the first parameter?
In addition, if the second parameter is evaluated prior to first parameter, then why is the following usage invalid?
(drop [1,2,3,4]) 2