How to print variable in sml?

I’m new to SML and in debugging I usually print out the variable to see if it matches up to what I expected it should be. I would like to print out a variable within a function
what i have is this :
function header..

let val prod 
 val prod = c + x * y;
in 
 (print "product "; prod mod 10):: (multiplyAux (prod div 10) xs y)
end;

Right now its printing the string product, but I would like to be able to print the variable prod itself.

Leave a Comment