Skip to content

(:inside) - Operators

select a value that appears inside another

clojure
(:inside scope val)

Where:

  1. scope: the enclosing value to confine the search to *
  2. val: what to find inside the scope *

Expanding into:

clojure
(:#across _ \1 \2)

Guides

Examples

Find translate() calls only inside render functions, not in boot/init code.

clojure
(:inside (fun render) (call translate))

Selects in lines { 2 }:

typescript
def boot():
  translate()

def render():
  translate()

translate()

Locate identifiers inside specific functions to understand variable usage.

clojure
(:inside (fun y) (id x))

Selects in lines { 1 }:

typescript
x
def x():
  x
def y():
  x
x

Find calls inside nested scopes by chaining :inside operators.

clojure
(:inside
  (fun outer)
  (:inside
    (fun inner)
    (call process)))

Selects in lines { 2 }:

typescript
def outer():
  process()
  def inner():
    process()

def inner():
  process()

Audit which functions call a deprecated API, excluding test utilities.

clojure
(:inside
  (:and
    (fun)
    (:not (fun /^test_/)))
  (call deprecatedAPI))

Selects in lines { 2 }:

typescript
def test_setup():
  deprecatedAPI()

def render():
  deprecatedAPI()

Arguments

scope

val

Copyright © 2022-present Semantic Works, Inc.