def BigInt.cmp
import bend-kit-bignum@0.1.0.0/bigint.bend as Bigintimport Base
371def BigInt.cmp(a: BigInt, b: BigInt) -> Cmp:
372 match a b:
373 case BigInt{False{}, x} BigInt{False{}, y}:
374 Mag.cmp(x, y)
375 case BigInt{True{}, x} BigInt{True{}, y}:
376 Mag.cmp(y, x)
377 case BigInt{False{}, x} BigInt{True{}, y}:
378 GT{}
379 case BigInt{True{}, x} BigInt{False{}, y}:
380 LT{}