I am trying to compare a list and an array and see if they are equal. Lets say we have a list list = [1;2;3;4] and an array ar = [|1;2;3;4|]. The function should return true if equal and false if not equal. I did it like this:
let list = [1;2;3;4]
let ar = [|1;2;3;4|]
let list' = Array.toList ar
(list = list')
So basically what I am doing is simply convert and compare two lists.. My question is is there any other way to do this, I mean which do not simply convert between list and array and which do not rely entirely on library functions.