def grow.if

bend-kit-cbor@0.3.0.0 · cbor.bend:34

import bend-kit-cbor@0.3.0.0/cbor.bend as Cbor
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

34def grow.if(grow: Bool, buf: Array<U32>, +k: U32) -> Array<U32>:
35  match grow:
36    case True{}:
37      Bytes.grow((k * 4 : U32), buf, (k * 8 : U32))
38    case False{}:
39      buf

Uses (5)

Used by (2)