let iter f n =
    for i = 0 to n_children n - 1 do
      f (child n i)
    done