hw2.ml 784 Bytes
Newer Older
James R. Wilcox's avatar
James R. Wilcox committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
(* CSE 341, Homework 2, Provided Code *)

(* Use these functions to extract parts of a date *)
let fst3 (x,_,_) = x (* gets the first element of a triple *)
let snd3 (_,x,_) = x (* gets the second element of a triple *)
let thd3 (_,_,x) = x (* gets the third element of a triple *)

(* TODO: Complete the 12 function bindings described in the
   assignment. For the first two problems, we have given you the
   *correct* first line and an *incorrect* function body. *)

(* 1 *)
let is_older ((date1 : int * int * int), (date2 : int * int * int)) =
  false (* TODO: actually implement is_older *)

(* 2 *)
let rec number_in_month ((dates : (int * int * int) list), (month : int)) =
  0 (* TODO: actually implement number_in_month *)

(* TODO: continue for problem 3 and onward here *)