What does disenstacken do again?

I just noticed that the docstring and implementation of disenstacken from the Python implementation doesn't match the definition in defs.txt:

? [uncons ?] loop pop

which is the same as [] step. Compare to the Python:

def disenstacken(stack):
    The disenstacken operator expects a list on top of the stack and makes that
    the stack discarding the rest of the stack.
    return stack[0]
Assigned to
8 months ago
7 months ago
No labels applied.

~sforman 8 months ago

So I can't find it now but I'm sure there was an unstack command that paired with stack, and there are enstacken and disenstacken (what about unenstacken?)

~sforman 8 months ago

I think stack and unstack should be non-destructive, and enstacken and disenstacken should be destructive.

stack == [] swaack [swaack pop] dupdip
stack == [[] swaack] nullary
unstack == [] step
enstacken == stack [clear] dip
disenstacken == [clear] dip reverse unstack

~sforman 8 months ago

Note to self: implement APL '/' op.

~sforman 7 months ago

split_at and shunt should cross-reference each other.

Register here or Log in to comment, or comment via email.