[+] first: second thoughts

stevan apter — 2003-07-08 23:26:10

i'm aware of three proposals:

1. leaves + on the stack (joy)
2. leaves [+] or '+ or .. on the stack
3. evaluate the stack until no change (ck, naked = 1)

1 is joy

3 can leave + or [x +] on the stack if it's short.

2 breaks some fundamental identities, to wit:

x = x dup [first] dip rest cons

x = newstack x unstack stack

e.g.

[+ -] dup [first] dip rest cons
['+ -]

also n.b.:

newstack [+ -] unstack stack
['+ '-]

stevan apter — 2003-07-08 23:26:10

i'm aware of three proposals:

1. leaves + on the stack (joy)
2. leaves [+] or '+ or .. on the stack
3. evaluate the stack until no change (ck, naked = 1)

1 is joy

3 can leave + or [x +] on the stack if it's short.

2 breaks some fundamental identities, to wit:

x = x dup [first] dip rest cons

x = newstack x unstack stack

e.g.

[+ -] dup [first] dip rest cons
['+ -]

also n.b.:

newstack [+ -] unstack stack
['+ '-]

stevan apter — 2003-07-08 23:26:10

i'm aware of three proposals:

1. leaves + on the stack (joy)
2. leaves [+] or '+ or .. on the stack
3. evaluate the stack until no change (ck, naked = 1)

1 is joy

3 can leave + or [x +] on the stack if it's short.

2 breaks some fundamental identities, to wit:

x = x dup [first] dip rest cons

x = newstack x unstack stack

e.g.

[+ -] dup [first] dip rest cons
['+ -]

also n.b.:

newstack [+ -] unstack stack
['+ '-]