My preference would be for Jon Meyer's first option:
'collect together any items pushed onto the stack while doing this and put
it into the appropriate structure, but ignore any pop's'
By "ignore any pops" I would mean that pops are indifferent to the fact that a
list (or vector) is being constructed. I really don't see why this is a
"mortal sin" (as someone called it) unless you object (presumably on religious
grounds) to the idea and common useage of the open stack in pop11.
One argument in favour of this approach is that it provides a (vaguely) useful
feature and replaces a (considerably) useless one.
It would be useful for the following situation: write a procedure get_results
which takes a procedure p as an argument (plus any arguments p needs
beforehand) and returns a list containing the results of p being run.
Clearly, I would like to be able to write:
define get_results( p );
lvars p;
[% p() %]
enddefine;
: get_results( [a b c], dest ) =>
** [a [b c]]
Any ideas for how to write this?
|