I'm trying to understand the type of the expression const (++) in Haskell. I know the individual types of const and (++) and I know that you can leave out parameters in order to return partially applied functions.
If I type :t const (++) I get const (++) :: b -> [a] -> [a] -> [a]. The way I think is that (++) wants two lists (I know however that all functions in Haskell are curried functions that actually just take one argument) and returns a list. This list is then the first argument to the const function, which waits for one more argument. So, I thought the type would be const (++) :: [a] -> [a] -> b -> [a].
But for example: const (++) 1 "hello" "you" returns "helloyou". How come the thing that is returned from the const operation is not the first argument, according to the definition of const which is const x _ = x? Where in my thought process am I incorrect?