
11 Feb
2010
11 Feb
'10
3:41 p.m.
Am Donnerstag 11 Februar 2010 21:09:37 schrieb kane96@gmx.de:
mysecondlist = 0:mylist
that's was I was searching for, but how can I add the element to the same list?
You can't. When you add an element to a list, it's a different list.
I have to get any number of inputs from the user and at the end, if he doesn't want to make more inputs, I have to print a list with all the inputs he did.
Make the list a parameter of the input loop. getInputs previous = do user <- getUserInput if endNow user then printList previous else getInputs (user:previous)