1

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.

deppep
  • 135
  • 1
  • 1
  • 7

0 Answers0