Question: Define a function single 'a list list -> 'a list which takes as input, a list of lists, and returns a list of an

Define a function single 'a list list -> 'a list which takes as input, a list of lists, and returns a list of

Define a function single 'a list list -> 'a list which takes as input, a list of lists, and returns a list of an original elements in the same order in which they appear in the argument. Examples: single [] = [] single [[]] = [] single [[1,2], [1, 3, 4], [], [5], [6,7]] single [["a"],["b", "c"]] ["a", "b", "c"]] = = [1,2,1,3,4,5,6,7]

Step by Step Solution

3.44 Rating (147 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

let rec single lst match lst with hd single tl Examples let example1 single ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!