We currently don't have a user exposed datatype for a "Context stack". Someday we will, and there will be a CONTEXT! type. For now, BINDING OF is a very limited operation that only looks up words to tell you what specific place it gets found in... you don't have its entire context.
So today, if you want to grab a context from somewhere and apply it somewhere else, you use an operation called INSIDE. For instance, here it is making it possible to automatically return a function's last evaluative product:
func: adapt lib.func/ [
body: inside body compose '[
return (as group! unbind body)
]
]
If you could extract a CONTEXT! you would be able to write this as:
func: adapt lib.func/ [
body: bind (binding of body) compose '[
return (as group! unbind body)
]
]
This would grab the context off the tip of the BODY block, and then apply it to the unbound product of the COMPOSE.
Binding Dialect Concept: ^body to "Use Tip Binding"
We could avoid having a separate INSIDE operator if BIND had a way of saying "use the tip".
I thought a ^META word might be nice in that dialect:
func: adapt lib.func/ [
body: bind [^body] compose '[
return (as group! unbind body)
]
]
It's something to consider, though a little disappointing that you need a BLOCK! to suppress the ^META evaluation. (We can't really make BIND's first argument literal the way FOR-EACH can in order to accomplish the Literal Arguments as Proxy for Dialecting... BIND wants to evaluate its arguments.)