(* CS 2SC3 / SE 2S03 class list -- Pouya Larjani *) type student = {macid: string; sid: string; course: string; last: string; first: string} let students = [ (* The list of students here is deleted for obvious reasons, but this is the sample of how they go: *) {macid="smithj1"; sid="0123456"; course="SE2S03"; last="SMITH"; first="JOHN"}; ] let get_student macid = match (List.filter (fun s -> s.macid = macid) students) with x::_ -> x | [] -> {macid=macid; sid=""; course=""; last=""; first=""} let get_students () = let dirs = Sys.readdir "repos" in Array.sort compare dirs; List.filter (fun s -> s.sid <> "") (List.map get_student (Array.to_list dirs))