Apply ocamlformat on t_array.ml

This commit is contained in:
Fardale 2023-05-05 22:18:00 +02:00
parent 492484a9a2
commit d2bdee097e

View file

@ -139,22 +139,18 @@ t @@ fun () -> rev [| 1; 2; 3 |] = [| 3; 2; 1 |];;
t @@ fun () -> rev [| 1; 2 |] = [| 2; 1 |];; t @@ fun () -> rev [| 1; 2 |] = [| 2; 1 |];;
t @@ fun () -> rev [||] = [||];; t @@ fun () -> rev [||] = [||];;
q Q.(array small_int) (fun a -> mem 1 a = Array.mem 1 a);; q Q.(array small_int) (fun a -> mem 1 a = Array.mem 1 a);;
eq (Some 3) (max Stdlib.compare [| 1; 2; 3 |]);; eq (Some 3) (max Stdlib.compare [| 1; 2; 3 |]);;
eq (Some 4) (max Stdlib.compare [| 4; -1; 2; 3 |]);; eq (Some 4) (max Stdlib.compare [| 4; -1; 2; 3 |]);;
eq (None) (max Stdlib.compare [||]);; eq None (max Stdlib.compare [||]);;
eq (Some 2) (argmax Stdlib.compare [| 1; 2; 3 |]);; eq (Some 2) (argmax Stdlib.compare [| 1; 2; 3 |]);;
eq (Some 0) (argmax Stdlib.compare [| 4; -1; 2; 3 |]);; eq (Some 0) (argmax Stdlib.compare [| 4; -1; 2; 3 |]);;
eq (None) (argmax Stdlib.compare [||]);; eq None (argmax Stdlib.compare [||]);;
eq (Some 1) (min Stdlib.compare [| 1; 2; 3 |]);; eq (Some 1) (min Stdlib.compare [| 1; 2; 3 |]);;
eq (Some ~-1) (min Stdlib.compare [| 4; -1; 2; 3 |]);; eq (Some ~-1) (min Stdlib.compare [| 4; -1; 2; 3 |]);;
eq (None) (min Stdlib.compare [||]);; eq None (min Stdlib.compare [||]);;
eq (Some 0) (argmin Stdlib.compare [| 1; 2; 3 |]);; eq (Some 0) (argmin Stdlib.compare [| 1; 2; 3 |]);;
eq (Some 1) (argmin Stdlib.compare [| 4; -1; 2; 3 |]);; eq (Some 1) (argmin Stdlib.compare [| 4; -1; 2; 3 |]);;
eq (None) (argmin Stdlib.compare [||]);; eq None (argmin Stdlib.compare [||]);;
t @@ fun () -> t @@ fun () ->
filter_map filter_map