Created
May 12, 2018 17:18
-
-
Save fdjones/40f91a46531e92efcbed234d54cb4daa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun number_in_months (dates : int*int*int list, months : int list) | |
if null dates | |
then 0 | |
else | |
number_in_month(dates, hd months) + number_in_months(dates, tl months) | |
val test3 = number_in_months ([(2012,2,28),(2013,12,1),(2011,3,31),(2011,4,28)],[2,3,4]) = 3; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment