How to use pattern matching within curried function
You can use the match … with … syntax:

let rec prefix a b =
    match (a, b) with
    | ([], _) -&gt; true
    | (_, []) -&gt; false
    | (x0::xst,y0::yst) -&gt; x0 = y0 &amp;&amp; prefix xst yst