[Haskell-beginners] Question on Lists

Nathan Holden nathanmholden at gmail.com
Sun Apr 19 15:24:15 EDT 2009

I have been reading Chris Okasaki's PhD thesis on Purely Functional Data
Structures (www.cs.cmu.edu/~rwh/theses/*okasaki*.pdf) and it discusses his
idea of lazy lists (He uses Standard ML in the paper), and it raised some
questions for me.

To cut to the chase, my question is this:

Say I have list x of length n, and I have a single piece of data y. Does
  x ++ [y]
take more cycles, or the same as if I'd said y:[x] (which would get it on
the wrong side?)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20090419/cd6460bc/attachment.htm

More information about the Beginners mailing list