6
with Empty -> raise Empty
10
with Empty -> raise Empty
18
| Cons of { content: 'a; mutable next: 'a cell }
22
mutable first: 'a cell;
26
let to_seq (q : 'a t) =
27
let q : 'a internal = Obj.magic q in
28
let rec aux c () = match c with
29
| Nil -> Stdcompat__seq.Nil
30
| Cons { content=x; next; } -> Stdcompat__seq.Cons (x, aux next)
45
let to_seq (q : 'a t) =
46
let q : 'a internal = Obj.magic q in
58
Stdcompat__seq.Cons (cell.content, tail') in
65
fold (fun accu content -> content :: accu) [] q
68
Stdcompat__list.to_seq (List.rev (to_list q))
71
let add_seq q i = Stdcompat__seq.iter (fun x -> push x q) i