-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(* Dan Grossman, Coursera PL, HW2 Provided Code *) | ||
|
||
(* if you use this function to compare two strings (returns true if the same | ||
string), then you avoid several of the functions in problem 1 having | ||
polymorphic types that may be confusing *) | ||
fun same_string(s1 : string, s2 : string) = | ||
s1 = s2 | ||
|
||
(* put your solutions for problem 1 here *) | ||
|
||
(* you may assume that Num is always used with values 2, 3, ..., 10 | ||
though it will not really come up *) | ||
datatype suit = Clubs | Diamonds | Hearts | Spades | ||
datatype rank = Jack | Queen | King | Ace | Num of int | ||
type card = suit * rank | ||
|
||
datatype color = Red | Black | ||
datatype move = Discard of card | Draw | ||
|
||
exception IllegalMove | ||
|
||
(* put your solutions for problem 2 here *) |
Empty file.