def Int.saturate

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

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

232def Int.saturate(+n: Nat, s: Bool, low: Bool, o: Bool & Word(n)) -> Word(n):
233  (ov, r) = o
234  match ov:
235    case True{}:
236      Int.sat(low, n, s)
237    case False{}:
238      r

Uses (6)

Used by (3)