Bytes.Cursor.write.if: def of bend-kit-bytes@0.3.3.0 Import: import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes Lines 909-915 of bend-kit-bytes@0.3.3.0/bytes.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&start_line=909&end_line=915 import Base def Cursor.write.if(~T: Data, ~write: Bytes -> @+i:U32 -> @+v:T -> Bytes, ok: Bool, c: Cursor, +n: U32, v: T) -> Cursor & Bool: match ok: case False{}: (c, False{}) case True{}: Cursor{b, +pos, start, end} = c (Cursor{write(b, pos, v), (pos + n : U32), start, end}, True{}) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Cursor