Hex Casting

Hex Casting

6M Downloads

[Suggestion] Corollary to Bookkeeper's Gambit which keeps the top of the stack and removes the rest

starji opened this issue ยท 0 comments

commented

At the moment, it can be difficult to create stack-stable 'functions' that utilize thoth's because there's no simple way to keep some of the top elements of the stack and remove the rest. A way to do it is to use Flock's Reflection + Gambit + Retrograde Purification, then extract the required elements from the front of the resulting list, but this requires a fair number of patterns and can be inconvenient to write.

A new stack manipulation pattern that can just keep some number of the top elements and discards the rest would make these kinds of utility patterns easier to write. e.g. something like Bookkeeper's Gambit, but removes all other elements of the stack not explicitly kept.