John Implementing an in place optimization that covered all of C. would be very worthwhile. However as the main goal is time efficiency, there will be a cross over point, as the number of items to be shuffled approaches n, where it may just be simpler to punt and copy the whole structure. Presuming there is not room to grow at both ends something like prepending, which demands an order n cycle, would fall into that class. Though as you say if the algorithm is simple enough, it should not hurt significantly to do it in place either And who knows, the space savings could be a significant benefit in some situation.
A header structure which allowed space at the beginning to grow (eg with beheading) could help some algorithms. i think postscript retained all the forth stack operators? ~greg ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
