Subject: Re: [xsl] Cheaper to prepend or append an item to a sequence? From: Michael Kay <mike@xxxxxxxxxxxx> Date: Tue, 22 Feb 2011 14:32:33 +0000 |
The accepted term in most functional programming languages is "a list".
A list is a functional data structure (immutable). Appending to a list causes the whole list to be copied and is O(N). Prepending a list is making just the "next pointer" of an item point to the list -- an O(1) operation.
Michael Kay Saxonica
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Cheaper to prepend or app, Dimitre Novatchev | Thread | Re: [xsl] Cheaper to prepend or app, Dimitre Novatchev |
Re: [xsl] Cheaper to prepend or app, Andrew Welch | Date | Re: [xsl] RE: Cheaper to prepend or, Dimitre Novatchev |
Month |