(* lenEvt buf returns an event that, when synchronized with, will yield the current length of buf *) val lenEvt : 'a buffer -> int CML.event (* newMaxLenEvt buf n returns an event, that when synchronized with, will attempt to set the maximum length of buf to n this attempt will succeed, resulting in the value true, if the current length of buf is no more than n this attempt will fail, resulting in the value false, if the current length of buf is strictly greater than n *) val newMaxLenEvt : 'a buffer -> int -> bool CML.event