Top "Smlnj" questions

Standard ML of New Jersey (SML/NJ)

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 …

sml smlnj
elseif statement in Standard ML?

Im doing a homework problem to make a function sumOdd to computer the sum of the first n odd integers, …

sml smlnj
Line Comments in Standard ML

I'm learning ML, with the SML/NJ dialect. What I'm trying to figure out is if there is a line …

sml smlnj
How do you print inside a case statement in SML?

I'm just starting out with SML, and I'm trying to modify some code so I understand what it's doing (I …

sml smlnj
How to use AND operator in IF statements in SML

I am new to SML. How do I use the AND operator inside IF statements? Here is my code: val …

sml smlnj ml
Typecasting in SML

I'm new to SML, and am using the SMLNJ dialect. For some purpose I have been trying to typecast 3 to 3.0 (…

sml smlnj
Syntax of nested "if else" in SML

I am strugging a bit to implement a nested if else expressions in SML. Can anyone highlight its syntax. Suppose …

sml smlnj
warning in the ML

can somebody please explain, what does this warning mean? stdIn:18.35 Warning: calling polyEqual and why do I have "a and …

sml smlnj
Curried anonymous function in SML

I have the function below and it works: (fn x => x * 2) 2; but this one doesn't work: (fn x y =&…

sml smlnj
SML map function

I have the function: map(map(fn x =>[x])) [[],[1],[2,3,4]]; Which produces: val it = [[],[[1]],[[2],[3],[4]]] I don't understand how this function …

sml smlnj currying partial-application map-function