问题
I'm getting the error in SMLNJ:
Error: syntax error found at EOF
what does this means? The function that seems to be causing the error is the following.
fun number_in_month (dates : int*int*int list, month : int) =
if null dates
then 0
else if #2 (hd dates) = month
then number_in_month(tl dates, month) + 1
It is supposed to take a list of dates (int*int*int
list) and a month (int
) and returns how many dates in the list are in the given month.
Thanks for your kind help.
来源:https://stackoverflow.com/questions/60449439/what-does-syntax-error-found-at-eof-means-and-why-am-i-getting-it-for-this-rec