Buffer using regular arrays
X : sig ... endval create : int ‑> tcreate size creates a new bounded buffer with given size.
The underlying array is allocated immediately and no further (large)
allocation will happen from now on.
< 1.blit_from buf from_buf o len copies the slice o, ... o + len - 1 from
a input buffer from_buf to the end of the buffer.
If the slice is too large for the buffer, only the last part of the array
will be copied.
o,len is not a valid slice of s.blit_into buf to_buf o len copies at most len elements from buf
into to_buf starting at offset o in s.
min len (length buf)).o,len is not a valid slice of s.append b ~into copies all data from b and adds it at the
end of into. Erases data of into if there is not enough room.
val junk_front : t ‑> unitDrop the front element from t.
val skip : t ‑> int ‑> unitskip b len removes len elements from the front of b.
len > length b.get_front buf i returns the i-th element of buf from the front, ie
the one returned by take_front buf after i-1 calls to junk_front buf.
length buf).get_back buf i returns the i-th element of buf from the back, ie
the one returned by take_back buf after i-1 calls to junk_back buf.
length buf).Push value at the back of t.
If t.bounded=false, the buffer will grow as needed,
otherwise the oldest elements are replaced first.