The pairs function needs to do something like this:
pairs [1, 2, 3, 4] -> [(1, 2), (2, 3), (3, 4)]
pairs [] = [] pairs xs = zip xs (tail xs)