I'm working on a stack based lang that has "wraps", essentially lambdas, that by default run with an isolated stack (though some commands can push things to a wrap's stack, effectively partially applying it)
Is this common design, or do lambdas usually share the same stack as the code that calls them?
Would there be a point in adding syntax for a wrap that captures (duplicates into its own stack) automatically some of its surroundings, and how could it look like?
For reference, wraps look like (commands...), so like the first 10 even numbers are 1 10 range (2 *) map, but I think this question extends to all languages that try to combine stack-based and functional concepts.
I'm essentially asking for suggestions on syntax for duplicating part of the outside stack inside a lambda's own stack, as well as the meta-question of if that is even needed or if 7 (+) flip bind is enough.