I am using patternmatching within a function as follows :
let rec calculate : Calculation<MyType> -> MyVO -> Calculation<MyType list>=
fun c l ->
fun arrayA arrayC ->
myComputationExpression {
if arrayA.Length<>arrayC.Length then
yield! l
else
match arrayA, arrayC with
| [], [] -> yield! C
| [a], [c] -> yield! calculate a c
| headA :: tailA, headC :: tailC ->
yield! calculateOpenAny headA headC
yield! calculate c l tailA tailC
}
I have the following warning :
Fsc: C:\myfile.fs(17,27): warning FS0025: Incomplete pattern matches on this expression. For example, the value '( _ , [_] )' may indicate a case not covered by the pattern(s).
I quite don't get it because, it should not happen becuse of the first conditionnal statement :
if arrayA.Length<>arrayC.Length then
Is there something I am missing here, or could I overlook the warning?