Hello, I was wondering why recursive functions need to be specified with "rec". According to Practical Ocaml, to "inform the compiler that the function exists". But when entering the function definition, can't the compiler note that the function is being defined so that when it sees the function calling itself, it wont say "Unbound value f"?
How is the knowledge of a function being rec taken advantage of (in ocaml) as opposed to other languages (leaving aside tail call optimization). Wouldn't one of way of detecting a recursive function would be to see if the indeed the function calls itself? These are very much beginners' questions. Thank you Saptarshi _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs