It is kind of like a mapping function that maps a specific String to a function with type as so.
Because I need to handle the call functionX [], which I think this call should return something called identity function, or whatever, how can I write it?

I'm a bit puzzled. Your functionX takes a list of strings but returns a single function. Or maybe you actually mean: "functionX :: String -> Int -> Int" Then you can apply it to a list of strings and integers using zipWith. By the way, your brackets are not needed; "->" is right-associative.
–
Paul JohnsonJul 3 '10 at 7:30

I may be remembering incorrectly, but i think haskell defaults to generic types
–
CogwheelJul 3 '10 at 4:38

3

@baboonWorksFine: Cogwheel's right. The identity function's return type is parameterized by its input type. Since it doesn't do anything with the input other than return it, it places no constraints on the input's type. In Haskell, lowercase letters in a type signature (like id :: a -> a) indicates that those symbols stand for a type parameter, rather than a concrete type like String or Integer.
–
rampionJul 3 '10 at 4:42