(*
   --------------------------------------------------------------------------
   title: Using Prune Parameter
   description: Remove infeasible regions with ~prune
   order: 4
   --------------------------------------------------------------------------

   Example 4: Using |>> prune to remove infeasible regions
*)

let abs_diff x y =
  if x > y then
    x - y
  else
    y - x

let classify_diff x y =
  let diff = abs_diff x y in
  if diff = 0 then
    "equal"
  else if diff < 5 then
    "close"
  else
    "far"
[@@decomp top ~prune:true ()]
