Re: [stack] Rewriting System
Manfred von Thun — 2001-07-02 02:38:26
On Sun, 1 Jul 2001, Jack Waugh wrote:
> In the paper on the rewriting system for Joy, I find:
>
> newstack stack => [].
>
> This doesn't look right. Doesn't => mean I can substitute in all
> cases the expression on the right for that on the left, and wind up
> with a program that denotes the same function? Here, the expression
> on the left denotes a function that eats up the stack and leaves only
> the empty list on top, i. e., the same effect as "newstack []". But
> the program on the right, [], means push [] on top of whatever was
> already on the stack, without clearing the stack first. That's a
> different function from stacks to stacks. What did I misunderstand?
You are exactly right. What I wrote in that paper is wrong. It should be
newstack stack => newstack []
I can fix that straight away in the web page. Thanks for pointing it out.
- Manfred