# `Spark.CodeHelpers`
[🔗](https://github.com/ash-project/spark/blob/v2.7.2/lib/spark/code_helpers.ex#L5)

Helpers for meta programming around code and code snippets

# `code_identifier`

```elixir
@spec code_identifier(Macro.t()) :: binary()
```

Given a section of Elixir AST, generate a hash of the code to help with
generating unique names.

# `lift_functions`

```elixir
@spec lift_functions(Macro.t(), atom(), Macro.Env.t()) :: Macro.t()
```

Lift anonymous and captured functions.

Acts as an AST transformer to allow these kinds of functions to be added in
the AST:

In the case of captured functions, it ensures they are all captured remote
functions (ie calls with both the module and function name present) - this
often requires the definition of a new public function on the target module.

In the case of anonymous functions, it converts them into a new public
function on the module and returns a (remote) function capture much like that
of above.

# `prewalk`

Copy of `Macro.prewalk/2` w/ a branch accumulator

# `prewalk`

Copy of `Macro.prewalk/3` w/ a branch accumulator

# `traverse`

A copy of the corresponding `Macro.traverse` function that has a separate accumulator that only goes *down* each branch, only for `pre`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
