Re: how to create a list of strings and add strings to it
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <CAOOOohTMw79oov=3NmVU4BuZauOTmd4o1QhLh0smzg-CXpcKKA@mail.gmail.com> |
Hello, Same problem here: in OCaml lists are immutable, so you can't add a string to a list. Rather, you create a new list using the string and the old list. The first chapter of real world ocaml should make it clear. cheers, Philippe. 2014-08-07 17:32 GMT+02:00 Arash Alavi [email protected] [ocaml_beginners] <[email protected]>: > > > > Hello, > Please help > > I want to create a list in parser and then add strings to this list. How > can I do this (creating a list in Ocaml and adding a string to it)? > > Regards, > Arash > > -- > Arash Alavi > Department of Computer Engineering & Information Technology > Amirkabir University of Technology > Email(s): [email protected] , [email protected] > Home page: http://ceit.aut.ac.ir/~arash.alavi > > > > > > >