def Int.put_msb

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

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

36def Int.put_msb(+n: Nat, +v: Bool, w: Word(n)) -> Word(n):
37  match n:
38    case 0n:
39      WNil{}
40    case 1n+p:
41      match w:
42        case WCon{b, t}:
43          WCon{Int.put_msb.bit(p, v, b), Int.put_msb(p, v, t)}

Uses (6)

Used by (3)