View difference between Paste ID: Yuwb2MsT and L1mQuWx4
SHOW: | | - or go back to the newest paste.
1
let (|LT|EQ|GT|) (x, y) =
2
  if x < y then LT
3
  elif x = y then EQ
4
  else GT
5-
    | Lt          -> aux (x, y - x)
5+
6-
    | Eq          -> x = 1
6+
7-
    | Gt          -> aux (x - y, y)
7+
8
    match x, y with
9
    | 0, _ | _, 0 -> false
10
    | LT          -> aux (x, y - x)
11
    | EQ          -> x = 1
12
    | GT          -> aux (x - y, y)
13
  aux (abs x, abs y)