I want to implement a lazy tree in Standard ML with
datatype tr = N of int * unit->tr * unit->tr;
I tried to use
fun form k = N(k,fn()=>form(k+1),fn()=>form(k+3));
as a test of concept, but I get error message saying type mismatch.
What would be the proper way of implementing a lazy tree in ML?