
let rec range s t f = if s > t then [] else (f s) :: range (s + 1) t f

let lst = range 1 9 (fun x ->
  range 1 9 (fun y ->
    Printf.sprintf "%dx%d=%d" x y (x*y)))

let _ = List.iter print_endline (List.concat lst)

                                      