type ('a, 'b) prod = Pair of 'a * 'b ;; type ('a) list = Cons of 'a * ('a) list | Nil ;; let HD = (fun x1 -> (match x1 with Nil -> (raise (Match_failure (string_of_bool true, 0, 0))) | (Cons (v2, v1)) -> v2)) ;; let TL = (fun x1 -> (match x1 with Nil -> (raise (Match_failure (string_of_bool true, 0, 0))) | (Cons (v2, v1)) -> v1)) ;; let rec APPEND v3 = (fun v4 -> (match v3 with Nil -> v4 | (Cons (v2, v1)) -> (Cons (v2, ((APPEND v1) v4))))) ;; let rec REV v3 = (fun v4 -> (match v3 with Nil -> v4 | (Cons (v2, v1)) -> ((REV v1) (Cons (v2, v4))))) ;; let REVERSE = (fun v1 -> ((REV v1) Nil)) ;;