The pairs function needs to do something like this:
pairs [1, 2, 3, 4] -> [(1, 2), (2, 3), (3, 4)]
You could go as far as
import Control.Applicative (<*>) pairs = zip <*> tail
but
pairs xs = zip xs (tail xs)
is probably clearer.