(* buffer.sig *) (* CML buffers with fixed maximum lengths *) signature BUFFER = sig (* a buffer whose elmements come from type 'a *) type 'a buffer exception Size (* create a buffer with a given maximum length; raises Size if the length is not positive *) val make : int -> 'a buffer (* addEvt buf x returns an event that, when synchronized with, will cause x to be added to the end of buf, and will yield () *) val addEvt : 'a buffer -> 'a -> unit CML.event (* delEvt buf returns an event that, when synchronized with, with remove the first element from buf, and will yield this element *) val delEvt : 'a buffer -> 'a CML.event end;