signature MLTON_ARRAY =
   sig
      val unfoldi: int * 'b * (int * 'b -> 'a * 'b) -> 'a array * 'b
   end
  • unfoldi (n, b, f)

    constructs an array a of length n, whose elements ai are determined by the equations a0 = b and (ai, bi+1) = f (i, bi).