File tree Expand file tree Collapse file tree 1 file changed +0
-37
lines changed Expand file tree Collapse file tree 1 file changed +0
-37
lines changed Original file line number Diff line number Diff line change @@ -219,13 +219,6 @@ let append_list a b =
219219 List. iter (push_unsafe_ a) b;
220220 ()
221221
222- let rec append_gen a b =
223- match b () with
224- | None -> ()
225- | Some x ->
226- push a x;
227- append_gen a b
228-
229222let equal eq v1 v2 =
230223 v1.size = v2.size
231224 &&
@@ -492,15 +485,6 @@ let flat_map f v =
492485 iter (fun x -> iter (push v') (f x)) v;
493486 v'
494487
495- let flat_map_iter f v =
496- let v' = create () in
497- iter
498- (fun x ->
499- let seq = f x in
500- append_iter v' seq)
501- v;
502- v'
503-
504488let flat_map_seq f v =
505489 let v' = create () in
506490 iter
@@ -635,27 +619,6 @@ let of_list l =
635619let to_array v = Array. sub v.vec 0 v.size
636620let to_list v = List. rev (fold (fun acc x -> x :: acc) [] v)
637621
638- let of_gen ?(init = create () ) g =
639- let rec aux g =
640- match g () with
641- | None -> init
642- | Some x ->
643- push init x;
644- aux g
645- in
646- aux g
647-
648- let to_gen v =
649- let { size; vec } = v in
650- let i = ref 0 in
651- fun () ->
652- if ! i < size then (
653- let x = vec.(! i) in
654- incr i;
655- Some x
656- ) else
657- None
658-
659622let to_string ?(start = " " ) ?(stop = " " ) ?(sep = " , " ) item_to_string v =
660623 start ^ (to_list v |> List. map item_to_string |> String. concat sep) ^ stop
661624
You can’t perform that action at this time.
0 commit comments