let rec f (a:int) : int list = if a=0 then [] else a::f (a-1)

let rec g (l:int list) : unit = match l with
  | [] -> print_newline ()
  | x::s -> print_int x; print_newline (); g s

let () = g (f 5)                             
