def Rational.show
import bend-kit-bignum@0.1.0.0/rational.bend as Rationalimport 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.