In order to print [(5,0), (6,0), (7,0)], I use a temporary variable (as if) n (Int type). Can anyone improve it without using the temporary variable? i.e. the function will be defined as count::[a]->[(a,Int)] Many thanks. count::Int [a]->[(a,Int)] count n []=[] count n [x:xs]=[(x, n ): count (n+1) xs] Start=count 0 [5,6,7]