Ergo.Context.ast_transform
You're seeing just the function
ast_transform
, go back to Ergo.Context module for more information.
Link to this function
ast_transform(ctx, fun)
Called to perform an arbitrary transformation on the AST value of a Context.
Examples
iex> alias Ergo.Context
...> context = Context.new()
...> context = %{context | ast: "Hello World"}
...> Context.ast_transform(context, &Function.identity/1)
%Context{ast: "Hello World"}
iex> alias Ergo.Context
...> context = Context.new()
...> context = %{context | ast: "Hello World"}
...> Context.ast_transform(context, &String.length/1)
%Context{ast: 11}