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
I tried to fix it by myself and that was my solution:
fun number_in_month (dias: (int*int*int) list,mes:int) =
if null dias
then 0
else if ((#2 (hd dias)) = mes)
then let val flag = 1 + number_in_month(tl dias, mes)
in flag
end
else number_in_month((tl dias),mes)