Make ints_of_string generic and move to lib.

This commit is contained in:
2024-12-05 15:43:18 +00:00
parent 3052751eb6
commit c6fb838463
3 changed files with 8 additions and 8 deletions

View File

@@ -1,4 +1,6 @@
let ints_of_string s = List.map int_of_string (Str.split (Str.regexp " +") s)
let ints_of_string ?(sep = " ") s =
List.map int_of_string (Str.split (Str.regexp sep) s)
let distance1 a b = abs (a - b)
let strings_of_file fname =