[Haskell-cafe] Large data structures

Alex Queiroz asandroq at gmail.com
Mon Dec 11 20:27:44 EST 2006

Hi all,

     I'm considering the use of Haskell to manipulate large data
structures for Computer Graphics (large geometric datasets). I'm
wondering what's the best way to do it. As "objects" (not in the OO
sense) in Haskell are immutable, how can I add a vertex to a large
mesh without using obscene amounts of memory? Making an analogy:

> enlarge :: a -> [a] -> [a]
> enlarge c cs = c : cs
> enlarge 15 [1..100000]

     Will this copy the whole list to make a new one with an element more?


More information about the Haskell-Cafe mailing list