Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Function forward declaration?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre@l...>
Subject: Re: [Caml-list] Function forward declaration?

Timo.Tapiola@tietoenator.com writes:
 > 
 > could someone tell me if there is some way to forward declare functions in
 > OCaml?
 > 
 > [...]
 > 
 > How should I deal with this situation if there is no way to forward declare
 > functions?	

Use mutually recursive functions, with syntax

	let rec f x = ...
   
	and g x = ...

	and h x = ...

-- 
Jean-Christophe

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners