« Return to Thread: List concat

List concat

by Andrew Coppin :: Rate this Message:

Reply to Author | View in Thread

The function (++) :: [x] -> [x] -> [x] has O(n) complexity.

If somebody were to invent some type that looks like [x] but actually
uses some sort of tree rather than a linked list, you should be able to
get O(1) concatenation. Has anybody ever implemented such a thing?

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe

 « Return to Thread: List concat

LightInTheBox - Buy quality products at wholesale price