exception Unimplemented exception AlreadyDone (*** part a ***) type move = Home (* | students : add more cases! *) (*** part b ***) let makePoly sides len = raise Unimplemented (*** part c ***) let interpLarge (movelist : move list) : (float*float) list = let rec loop movelist x y dir acc = match movelist with [] -> raise Unimplemented | Home::tl -> raise Unimplemented (* | students: add more cases! *) in List.rev (loop movelist 0.0 0.0 0.0 [(0.0,0.0)]) (*** part d ***) let interpSmall (movelist : move list) : (float*float) list = let interpSmallStep movelist x y dir : move list * float * float * float = match movelist with [] -> raise Unimplemented | Home::tl -> raise Unimplemented (* | students: add more cases! *) in let rec loop movelist x y dir acc = raise Unimplemented in List.rev (loop movelist 0.0 0.0 0.0 [(0.0,0.0)]) (*** part e ***) (* modify this comment: note, can be done just by reading the assignment *) (*** part f ***) let interpTrans movelist : float->float->float-> (float * float) list * float= let compose f1 f2 = raise Unimplemented (* suggested helper function *) in match movelist with [] -> raise Unimplemented | Home::tl -> raise Unimplemented (* | students: add more cases! *) (*** possibly helpful testing code ***) (* you do not have to use this "testing" code, but you might find it useful *) (* no need to change more than example_logo_prog *) let example_logo_prog = raise Unimplemented let ansL = interpLarge example_logo_prog let ansS = interpSmall example_logo_prog let ansI = (0.0,0.0)::(fst ((interpTrans example_logo_prog) 0.0 0.0 0.0)) let rec pr lst = match lst with [] -> () | (x,y)::tl -> print_string("(" ^ (string_of_float x) ^ "," ^ (string_of_float y) ^ ")"); pr tl let _ = pr ansL; print_newline (); pr ansS; print_newline (); pr ansI; print_newline ();