(* This program illustrates how to define mutually recursive functions. Note the keyword "and". *) let rec f = function | n when n%2=0 -> f(n-1) | n -> g(n-1) and g = function | x when x<1 -> 1 | x when x%2=1 -> f(x-1) | x -> g(x-1);; printfn "%d\n" (f(10));; // use extra ()s when calling curried functions.