Re: reverse a list. is this a good solution
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <[email protected]> |
Le 20/10/2014 19:49, Roelof Wobben [email protected] [ocaml_beginners] a écrit : > I find this solution a little bit confusing expecially the in part . Yes. The first part is an inner function definition, and the second part is calling it. This allows to hide the accumulator from outside. let myfunction param = let inner_hidden_function first_argument second_argument = ... function definition ... in inner_hidden_function param [] Salutations -- Matthieu Dubuget Guide d’autodéfense numérique : http://guide.boum.org