let rec inner l = function 
   | 0 -> l 
...