Settings.mag_lt: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/settings.bend as Settings Lines 189-195 of cswap-bend-cli@0.1.0.0/settings.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/settings.bend&start_line=189&end_line=195 import Base # a < b on magnitudes. def mag_lt(a: Dec, b: Dec) -> Bool: match a b: case Dec{na, +ia, +fa} Dec{nb, +ib, +fb}: Nat.is_lt(String.length(ia), String.length(ib)) || (Nat.is_eq(String.length(ia), String.length(ib)) && (String.is_lt(ia, ib) || (String.eq(ia, ib) && String.is_lt(fa, fb)))) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.length https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/settings.bend&name=Dec