Elements of type a must be of class Eq, as mentioned earlier. The Eq typeclass class defines types that can be compared for equality with other types, with th '==' operator / function
This means that your function takes as a single parameter a list of elements 'a'
[a] is a list of types a
and returns a list of (Int, a) pairs, i.e. a list of 2 tuples, where the first element in the tuple is Int, and the second is of the same type as the list passed to the function.
(not native English speaker here, sorry :))
source
share