I am fresh on SML and doing a homework by that. \"Write a function number_in_month that takes a list of dates and a month (i.e., an int) and returns how many dates in the li
You can't bind variables "that way". A binding of a variable is a declaration and thus cannot be done where an expression is expected.
In this case you have to use a let-in-end expression
fun foo x = let val a = 42 in a*x end