test for funvec

This commit is contained in:
Simon Cruanes 2020-04-18 22:14:35 -04:00
parent 15fb26249f
commit 952b664a68

View file

@ -250,6 +250,18 @@ let pop (v:'a t) : ('a * 'a t) option =
() ()
*) *)
(*$QR
Q.(pair int (small_list int)) (fun (x,l) ->
let q0 = of_list l in
let q = push x q0 in
assert_equal (length q) (length q0+1);
let y, q = pop_exn q in
assert_equal x y;
assert_equal (to_list q) (to_list q0);
true
)
*)
let iteri ~f (m : 'a t) : unit = let iteri ~f (m : 'a t) : unit =
(* basically, a 32-way BFS traversal. (* basically, a 32-way BFS traversal.
The queue contains subtrees to explore, along with their high_idx_ offsets *) The queue contains subtrees to explore, along with their high_idx_ offsets *)