How to insert data into list? type AddressBook = List Entry e1:: Entry e1 = {fname: "XYZ", lname: "Zys", address: a1} I need to add this entry to AddressBook. How to do it?
How to insert data into list? type AddressBook = List Entry e1:: Entry e1 = {fname: "XYZ", lname: "Zys", address: a1} I need to add this entry to AddressBook. How to do it?
Perhaps you are new to functional programming? Lists are supposed to be immutable, i. e. you don't change an existing list but rather construct a new one, say with cons
Perhaps you are new to functional programming? Lists are supposed to be immutable, i. e. you don't change an existing list but rather construct a new one, say with cons
ah, List, sorry, for some reason I thought that you're asking about records, afaik the purescript-by-example book has a good introduction knowing how records work won't hurt either :)