def signed

yaml-for-bend@0.1.1.0 · num.bend:84

import yaml-for-bend@0.1.1.0/num.bend as Num
import Base

84# An integer's text: "-" when negative and not zero.
85def signed(+neg: Bool, +digits: String) -> String:
86  Bool.pick(String, Bool.and(neg, Bool.not(String.eq(digits, "0"))), "-" ++ digits, digits)

Uses (7)

Used by (2)