let rec makelistNtoM n m = if n > m then [] else n :: makelistNtoM (n+1) m let _ = let lst = Array.to_list (Array.init 9 (fun _ -> Scanf.scanf "%d " (fun x -> x))) in let checklst = makelistNtoM 1 10 in let n = List.filter (fun x -> not (List.mem x lst)) checklst in Printf.printf "%d\n" (List.hd n)