def Int.neg_if

bend-kit-int@0.2.0.0 · int.bend:92

import bend-kit-int@0.2.0.0/int.bend as Int
import Base

92def Int.neg_if(+n: Nat, c: Bool, w: Word(n)) -> Word(n):
93  match c:
94    case True{}:
95      Int.neg(n, w)
96    case False{}:
97      w

Uses (4)

Used by (2)