[Haskell-cafe] IO Help
Mark Wallsgrove
mark at simplycompute.co.uk
Thu May 8 10:43:27 EDT 2008
Thank you all for your help, you have been invaluable
Thomas Davie wrote:
>
> On 8 May 2008, at 16:31, Mark Wallsgrove wrote:
>
>> Was there? I have been google'ing that problem for ages..
>>
>> Just one more thing. I have to make a menu system where the user
>> chooses what functionality they want. Because you cannot change a
>> value once it is set I have used recursion so that when something
>> changes it then calls the menu back up. I feel this is way to memory
>> consuming. Is there another way?
>
> While this method feels like it should consume lots of memory, it in
> fact doesn't. Remember that you're dealing with a graph machine, and
> that no stack is maintained of all the calls you've made. The garbage
> collector will simply follow you through the menu system clearing up the
> memory behind you.
>
> Bob
>
More information about the Haskell-Cafe
mailing list