(* buffer.sig *) (* CML buffers of length at most one *) signature BUFFER = sig (* a buffer whose elements have type 'a *) type 'a buffer (* create a buffer *) val make : unit -> 'a buffer (* add(buf, x) adds x to buf, and then returns (); it blocks until the addition is possible *) val add : 'a buffer * 'a -> unit (* del buf deletes the element of buf, and returns the deleted element; it blocks until the deletion is possible *) val del : 'a buffer -> 'a end;