Re: List.flatten....
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <[email protected]> |
On 02.04.2016 07:32, Douglas Lewit [email protected] [ocaml_beginners] wrote: > > > I think I read somewhere that the cons operator :: is more efficient than the > append operator @, so whenever possible it's better to use cons rather than append. # List.cons ;; (* this is :: *) - : 'a -> 'a list -> 'a list = <fun> # List.append ;; (* this is @ *) - : 'a list -> 'a list -> 'a list = <fun> # there is a tiny little difference, can you find it? /Str.