I'm using SML/NJ v110.80 and Lazy.I tried the following code in repl
Control.lazysml := true;
open Lazy;
fun f x = f x;
let val x = $(f(4)) in 15 end;
The last expression should be 15 but it diverges. Did I make a mistake or it just works improperly? Thanks.
I find that it's my fault I should write
let val lazy x = $(f(4)) in 15 end;
I found this information here --http://www.geocities.jp/m_hiroi/func/smlnj16.html