def Rational.show

bend-kit-bignum@0.1.0.0 · rational.bend:89

import bend-kit-bignum@0.1.0.0/rational.bend as Rational
import Base
import bend-kit-bignum@0.1.0.0/decimal.bend as Dec

89# "n/d", or "n" when the denominator is 1.
90def Rational.show(r: Rational) -> String:
91  match r:
92    case Rational{n, +d}:
93      Rational.show.if(Dec.Decimal.is_one(d), n, d)

Uses (4)

Used by (0)

No other definition uses this definition.