ops/:inside
selects values that appear inside a specific scope (lexically contained)
(:inside scope val)Where:
Expanding into:
(:#across _ \1 \2)Behavior
- The scope argument defines the container (e.g., functions, classes), and val defines what to find within.
- Respects nesting - can be composed to find values inside nested scopes.
- Using (:into) on the scope argument includes the scope itself in results.
Examples
Find translate() calls only inside render functions, not in boot/init code.
(:inside (fun render) (call translate))Selects in lines { 2 } but not in { }:
def boot():
translate()
def render():
translate()
translate()Locate identifiers inside specific functions to understand variable usage.
(:inside (fun y) (id x))Selects in lines { 1 } but not in { }:
x
def x():
x
def y():
x
xFind calls inside nested scopes by chaining :inside operators.
(:inside
(fun outer)
(:inside
(fun inner)
(call process)))Selects in lines { 2 } but not in { }:
def outer():
process()
def inner():
process()
def inner():
process()Audit which functions call a deprecated API, excluding test utilities.
(:inside
(:and
(fun)
(:not (fun /^test_/)))
(call deprecatedAPI))Selects in lines { 2 } but not in { }:
def test_setup():
deprecatedAPI()
def render():
deprecatedAPI()Arguments
scope
• (:#across) • (:after) • (:at) • (:before) • (:inside) • (:outside) • (:kind) • (:ref) • (:text) • (:and) • (:not) • (:or) • (:into) • (:replace) • (:capture)
val
• (:#across) • (:after) • (:at) • (:before) • (:inside) • (:outside) • (:kind) • (:ref) • (:text) • (:into) • (:and) • (:or) • (:not) • (:replace) • (:capture)