removed useless imports

This commit is contained in:
2024-12-12 01:25:44 +01:00
parent 14f445011c
commit 2ca07cc93c
10 changed files with 9 additions and 20 deletions

View File

@@ -1,5 +1,4 @@
open Printf;;
open String;;
let rec build_list in_file =
try
@@ -15,7 +14,7 @@ let is_not_empty lst =
| _ -> true
let rec parse_list (l1, l2) str =
let list1 = (List.filter (fun a -> length a != 0) (String.split_on_char ' ' str)) in
let list1 = (List.filter (fun a -> String.length a != 0) (String.split_on_char ' ' str)) in
let list_of_int = List.map int_of_string list1 in
match list_of_int with
| e1 :: e2 :: _ -> (e1 :: l1, e2 :: l2)

View File

@@ -1,6 +1,4 @@
open Printf;;
open String;;
open Map;;
let rec list_of_lines in_file =
try
@@ -12,7 +10,7 @@ let rec list_of_lines in_file =
let file_to_2d_array in_file =
let lines = list_of_lines in_file in
let size_x = length @@ List.hd lines in
let size_x = String.length @@ List.hd lines in
let size_y = List.length lines in
let arr = Array.make_matrix size_x size_y '?' in
List.iteri (fun j line -> String.iteri (fun i c -> arr.(j).(i) <- c) line) lines;

View File

@@ -1,5 +1,4 @@
open Printf;;
open String;;
let rec list_of_lines in_file =
try
@@ -15,7 +14,7 @@ let is_not_empty lst =
| _ -> true
let rec parse_int_list str =
let list1 = (List.filter (fun a -> length a != 0) (String.split_on_char ' ' str)) in
let list1 = (List.filter (fun a -> String.length a != 0) (String.split_on_char ' ' str)) in
List.map int_of_string list1
let rec int_list_diff int_list =

View File

@@ -1,5 +1,4 @@
open Printf;;
open String;;
open Str;;
let read_whole_file f =

View File

@@ -1,6 +1,5 @@
open Printf;;
open Buffer;;
open String;;
open Str;;
let rec list_of_lines in_file =
@@ -13,7 +12,7 @@ let rec list_of_lines in_file =
let file_to_2d_array in_file =
let lines = list_of_lines in_file in
let size_x = length @@ List.hd lines in
let size_x = String.length @@ List.hd lines in
let size_y = List.length lines in
let arr = Array.make_matrix size_x size_y '?' in
List.iteri (fun j line -> String.iteri (fun i c -> arr.(j).(i) <- c) line) lines;

View File

@@ -1,5 +1,4 @@
open Printf;;
open String;;
open Map;;
let rec list_of_lines in_file =
@@ -11,7 +10,7 @@ let rec list_of_lines in_file =
[]
let rec parse_int_list sep str =
let list1 = (List.filter (fun a -> length a != 0) (String.split_on_char sep str)) in
let list1 = (List.filter (fun a -> String.length a != 0) (String.split_on_char sep str)) in
List.map int_of_string list1
(* Ordering map is a map that indexes int and maps it into a set of ints,
@@ -22,7 +21,7 @@ module IntSet = Set.Make(Int)
let rec parse_ordering lines ordering_map =
match lines with
| head :: tail ->
if length head > 0 then
if String.length head > 0 then
let elems = parse_int_list '|' head in
let e1 = List.hd elems in
let e2 = List.nth elems 1 in

View File

@@ -1,5 +1,4 @@
open Printf;;
open String;;
let rec list_of_lines in_file =
try
@@ -11,7 +10,7 @@ let rec list_of_lines in_file =
let file_to_2d_array in_file =
let lines = list_of_lines in_file in
let size_x = length @@ List.hd lines in
let size_x = String.length @@ List.hd lines in
let size_y = List.length lines in
let arr = Array.make_matrix size_x size_y '?' in
List.iteri (fun j line -> String.iteri (fun i c -> arr.(j).(i) <- c) line) lines;

View File

@@ -1,5 +1,4 @@
open Printf;;
open String;;
let rec list_of_lines in_file =
try
@@ -13,7 +12,7 @@ let clean_string str =
str |> String.split_on_char ':' |> List.hd
let rec parse_int_list sep str =
let list1 = (List.filter (fun a -> length a != 0) (String.split_on_char sep str)) in
let list1 = (List.filter (fun a -> String.length a != 0) (String.split_on_char sep str)) in
List.map (fun x -> int_of_string @@ clean_string x) list1
let rec is_possible_inner goal operand_list =

View File

@@ -1,5 +1,4 @@
open Printf;;
open String;;
open Map;;
let rec list_of_lines in_file =
@@ -12,7 +11,7 @@ let rec list_of_lines in_file =
let file_to_2d_array in_file =
let lines = list_of_lines in_file in
let size_x = length @@ List.hd lines in
let size_x = String.length @@ List.hd lines in
let size_y = List.length lines in
let arr = Array.make_matrix size_x size_y '?' in
List.iteri (fun j line -> String.iteri (fun i c -> arr.(j).(i) <- c) line) lines;

View File

@@ -1,5 +1,4 @@
open Printf;;
open String;;
let rec list_of_lines in_file =
try