Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Due date: May 16th, 2017 (No late submission please) How to submit? Submit a har

ID: 3841036 • Letter: D

Question

Due date: May 16th, 2017 (No late submission please) How to submit? Submit a hardcopy of your source code and sample re 1. 20 points) Define a function single a list list a list which takes in input a list of ists and gives back the list consisting of all the elements, in the same order in which they appear in the argument. Examples: single single Ill (1 single [11, 21, 11, 3, 4], [6, 711 single t ("a" l t"b", "c" ("a", "b", "c"11 (1,2,1,3, 4, 5, 6, 71 8 P tt's a Great Day for a Great Deal 2 30 points)

Explanation / Answer

single: 'a list list -> 'a list
   (* Using List.concat, we can append all lists at a time *)
   val res = List.concat(a) :string list

----------------------------------------------------------------------------------------------------------------------------------------------------------

using this List.concat method, it can append all lists into single list.
  

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote