[Haskell-cafe] Re: Large data structures

Alex Queiroz asandroq at gmail.com
Tue Dec 12 07:25:30 EST 2006


On 12/12/06, Benjamin Franksen <benjamin.franksen at bessy.de> wrote:
> Alex Queiroz wrote:
> > On 12/11/06, Stefan O'Rear <stefanor at cox.net> wrote:
> >> No.  Haskell's lists are linked lists, enlarge creates a single new link
> >> without modifying (and copying) the original.
> >      Thanks. Is there a way to mimic this behaviour with my own code?
> It is the default for any data structure you define. Data is by default
> represented internally as a pointer to the actual value. Otherwise
> recursive structures (see below for an example) would not be easily
> possible. And since no part of the data structure is 'mutable', different
> instances can share (memory-wise) as much of their structure as the
> implementation is able to find.

     Ok, I think I got it now. :-)

> PS: Please try to include exactly the relevant context in replies, no more,
> no less. Your original question (stripped down to the body of the text)
> would have been relevant, here, but neither 'Hello', nor 'Cheers' are worth
> quoting.

     Sorry, but I did not quote "hello" or "cheers".


More information about the Haskell-Cafe mailing list