type nat = Zero | S of nat ;; let rec iter f g x = match x with | Zero -> g | S(x') -> f (iter f g x') ;; let compS f z = f (S(z)) ;; let id y = y ;; let iterid n = iter compS id n Zero ;; ()