def bstr.copy
import bend-kit-cbor@0.3.0.0/cbor.bend as Cborimport Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
507def bstr.copy(+n: U32, +i: U32, r: Array<U32> & Bool) -> Array<U32> & Maybe<&1, Bytes.Bytes>:
508 (a, ok) = r
509 match ok:
510 case True{}:
511 bstr.some(n, Bytes.copy(n, a, Bytes.alloc(n), i, 0))
512 case False{}:
513 (a, None{})