[MLton] Fixed points in SML

skaller skaller at users.sourceforge.net
Tue Aug 29 21:50:40 PDT 2006


On Wed, 2006-08-30 at 01:49 +0200, Wesley W. Terpstra wrote:

> The point of my email is this: I believe both changes must be made to  
> ANY fixed point algorithm implemented in SML. It seems to me that a  
> datatype is necessary to implement recursion, and I challenge anyone  
> to find a SML fixed-point implementation that doesn't use a datatype.  

Well this is Ocaml:

(** fixpoint combinator *)
val fix:
 (('a -> 'b) -> 'a -> 'b) -> 'a -> 'b


let rec fix f x = f (fix f) x


-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net




More information about the MLton mailing list