« Gripes with SLinks Implementation | Main | Hazards of continuation-passing »

Links Bug

This program doesn't seem to infer a type for arg:

fun fact(n) { if (n == 0) then { 1 } else { n * fact(n-1) } }
fun factpair(n) { (arg=n|(fact=fact(n))) }
r = factpair(12);
r;
r.fact;
r.arg

(arg=12,fact=479001600) : (arg:'28,fact:int)
479001600 : int
12 : '34


Post a comment