On Wed, Mar 28, 2007 at 05:39:07AM -0700, Logesh Pillay wrote:
> Is there a built-in o'caml equivalent of haskell's iterate function
> which applies a function to a number repeatedly as in f ( f ( .....(f
> x)..)
I don't think there's a built-in function, but it's very simple to
write one.
On the other hand, common forms of iteration are often captured more
elegantly by functions like List.map, List.fold_left and List.iter.
Rich.
--
Richard Jones
Red Hat
.