Being new to SML, using SML NJ I recognized this behavior of a function:
- fun test g= fn x=>x;
val test : 'a -> 'b -> 'b = _fn
- test 1 2;
val it : int = 2
- test 1;
val it : '1 -> '1 = _fn
Is it so, that the interpreter uses unit
as datatype for the input parameter g, if no value is given for it at the call of the function? If so, why is this happening to g and not the input parameter for the anonymous function?