A stack might be implemented using a
data structure like ,&</1e3$123

However, testing seems to indicate that
the entire nested structure is copied
on every subsequent operation.

   a=:,&</1e4$123
   7!:2'a=:123,&<a'
166144
   7!:2'a=:123,&<a'
166144

So, apparently this is a bad idea.

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to