Question: (Problem 7 (append) *) Write a function that takes lists ll and 12 and returns a list * containing the items in 11 followed by

(Problem 7 (append) *) Write a function that takes lists ll and 12 and returns a list * containing the items in 11 followed by a the items in 1.2 NOTE: OCaml actually already provides this function. In future * homeworks you can use built in operator@, which appends l1 and 12 * as in l1 a 12. Do *not* use the a operator in your solution to this * problem. ) let rec append (ll: string list) (12: string list) : string list - failwith "append: unimplemented" let test ): bool - (append [] []) = [] ;; run test "append two empty lists" test let test ):bool - (append ["1"; "2"] ["3"]) - ["1"; "2"; "3"] ; ; run_test "append different lengths" test let test ): bool - failwith "Adda real test case" ;; run_test "append [ADD A DESCRIPTIVE NAME FOR YOUR TEST HERE]" test let test ): bool - failwith "Add a real test case" ;; run test "append [ADD A DESCRIPTIVE NAME FOR YOUR TEST HERE]" test
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
