I am new to SML, but would like to get some experience with a strongly typed language. I've been looking at tutorials and I copied a simple factorial function:
fun Factorial n =
if n = 0 then 1
else n * Factorial (n-1);
However, I am not sure how to save this program (Factorial.sml) in order to run it later. Also, I am confused as to how I pass an argument to this function; how would I run this function with n=5
?