bbuf_peeki = class implements bbuf_peek extends bbuf_basei peek = method({full,mid}b:self{-}) replies(int) reply(b.arr[b.opt]) end peek end bbuf_basei
bbuf_hli = class implements bbuf_hl extends bbuf_basei after get{mid}, put{mid} use hilow hilow = method({mid}b:self{high,low}) if b.cnt>=b.size/2 then b!{high} else b!{low} end end hilow end bbuf_hli