Error in code to flatten a list in Ocaml?

In OCaml, all the elements of a list must be the same type. Thus the value 1; 2; 3; 4 is invalid all by itself. It contains two elements that are of type int and one element of type int list .

In essence, your statement of the problem to be solved is impossible.

You can start by writing directly your algorithm, by decomposing the base cases of your input value, ie. The input list is either empty, or the head of the input list is empty, or the head of the input list has a head and a tail.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions