mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2026-01-21 16:56:39 -05:00
breaking: change signature of CCDeque.of_seq
This commit is contained in:
parent
d204e1946f
commit
e248b555da
2 changed files with 6 additions and 2 deletions
|
|
@ -159,7 +159,8 @@ let add_seq_front q seq = seq (fun x -> push_front q x)
|
|||
assert_equal [1;2;3;4;5;6;7] (to_list q);
|
||||
*)
|
||||
|
||||
let of_seq ?(deque=create ()) seq =
|
||||
let of_seq seq =
|
||||
let deque = create () in
|
||||
seq (fun x -> push_back deque x);
|
||||
deque
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,10 @@ val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
|
|||
type 'a gen = unit -> 'a option
|
||||
type 'a sequence = ('a -> unit) -> unit
|
||||
|
||||
val of_seq : ?deque:'a t -> 'a sequence -> 'a t
|
||||
val of_seq : 'a sequence -> 'a t
|
||||
(** Create a deque from the sequence.
|
||||
@since NEXT_RELEASE optional argument [deque] disappears, use
|
||||
{!add_seq_back} instead *)
|
||||
|
||||
val to_seq : 'a t -> 'a sequence
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue