def item.len
import bend-kit-cbor@0.3.0.0/cbor.bend as Cborimport Base
596# Every item takes a byte, so a count past the bytes left is malformed; this also keeps it in a U32.
597def item.len(+map: Bool, +arg: W64, +len: U32, +i: U32, stack: List<&1, Frame>) -> St:
598 W64{+hi, +lo} = arg
599 item.count(U32.is_eq(hi, 0) && U32.is_le(lo, (len - i : U32)), map, lo, i, stack)