Created
May 14, 2018 17:18
-
-
Save fdjones/3839b1d1438086974bbbf7d1a6bde175 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 date_to_string (date: int*int*int) = | |
let val months = [January, February, March, April, May, June, July, August, September, October, November, December] | |
in | |
get_nth(months, #2 date) ^ " " ^ Int.toString(#3 date) ^ ", " ^ Int.toString(#1 date) | |
end | |
(* errors: *) | |
Error: unbound variable or constructor: December | |
Error: unbound variable or constructor: November | |
Error: unbound variable or constructor: October | |
etc..... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment