Skip to content

Commit

Permalink
Working on assignment_02
Browse files Browse the repository at this point in the history
  • Loading branch information
roca committed Jan 28, 2013
1 parent c79540d commit 85f6c78
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions hw2provided.sml
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 added hw2providedTests.sml
Empty file.

0 comments on commit 85f6c78

Please sign in to comment.