Thank you all for the explanation, I was very close , but Its dificult for me to see this kind of functions, like Jon Harrop wrote Pattern matching makes that function more understandable.
Karl Zilles wrote:
I know it's summer and all, but is this for a class? The function is
pretty contrived. Where did you find it?
What did you mean with "pretty contrived"? Sorry for my bad english Im from Spain.
That function was in one exam in the University of La Coruña in Spain.
There is no notes or manual about Ocaml in spanish on internet , so could you give me some urls to learn Ocaml for newbies like me ? Im trying to learn but I come from Java and C and Its sooo diferent....
Thank you again :)