Module Generation

exception Invalid
type 'a t = {
generation : int;
value : 'a;
}
val generation : int Pervasives.ref
val wrap : 'a ‑> 'a t
val maybe : 'a t ‑> ('a ‑> 'b) ‑> 'b ‑> 'b
val extract : 'a t ‑> 'a
val resume : unit ‑> unit