partition p (x:xs)
    | p x  = Pair (x:ys) zs
    | True = Pair ys (x:zs)
  where
    Pair ys zs = partition p xs
partition p (x:xs)
    | p x  = Pair (x:ys) zs
    | True = Pair ys (x:zs)
  where
    Pair ys zs = partition p xs
partition p (x:xs)
    | p x  = Pair (x:ys) zs
    | True = Pair ys (x:zs)
  where
    Pair ys zs = partition p xs