localMaxima :: [Integer] -> [Integer]
localMaxima xs = map s $ filter p $ zip3 xs ys zs
  where
    s  = \(x,y,z) -> y
    p  = \(x,y,z) -> y > x && y > z
    zs = tail ys
    ys = tail xs
localMaxima :: [Integer] -> [Integer]
localMaxima xs = map s $ filter p $ zip3 xs ys zs
  where
    s  = \(x,y,z) -> y
    p  = \(x,y,z) -> y > x && y > z
    zs = tail ys
    ys = tail xs
localMaxima xs = map s $ filter p $ zip3 xs ys zs
  where
    s  = \(x,y,z) -> y
    p  = \(x,y,z) -> y > x && y > z
    zs = tail ys
    ys = tail xs