Use =, not ==.
Floats are reference types in ocaml and ==checks for reference equality. Therefore it 0.1 == 0.1is false.
As a rule, you almost always want to use =, not ==to compare two values.
, true . , , true , , , - .
List.length , , (-, O (n), O (1) ). .
:
let rec compareVs v1 v2 = match v1, v2 with
| [], [] -> true
| [], _
| _, [] -> false
| x::xs, y::ys -> x = y && compareVs xs ys
, , , v1 = v2 .