The following function is trying to match a (int * stmt list) list (where stmt is just a type defined elsewhere) and return a stmt list.
let rec findinlist (r: int) (l1: (int * stmt list) list ) (l2: stmt list) =
(match l1 with
| [] -> l2
| h:: _ when h= (r,s) -> s
| _ :: t -> findinlist r t l2
)
First off this gives me an unbound value s error but how would I go about accomplishing this?