let sublist l start length =
try
let arr = Array.of_list l in
let sub_array = Array.sub arr start length in
Array.to_list sub_array
with (Invalid_argument "Array.sub") ->
raise (Invalid_argument "List.sub")