t :: Diagram -> Diagram
zSort diag = diag { points = sortBy cmpPoints (points diag) }
  where
    cmpPoints :: Point -> Point -> Ordering
    cmpPoints p1 p2 = compare (negate $ z p1) (negate $ z p2)
zSort :: Diagram -> Diagram
zSort diag = diag { points = sortBy cmpPoints (points diag) }
  where
    cmpPoints :: Point -> Point -> Ordering
    cmpPoints p1 p2 = compare (negate $ z p1) (negate $ z p2)
zSort diag = diag { points = sortBy cmpPoints (points diag) }
  where
    cmpPoints :: Point -> Point -> Ordering
    cmpPoints p1 p2 = compare (negate $ z p1) (negate $ z p2)