pelemay v0.0.9 Analyzer
Provides optimizer for anonymous functions.
Link to this section Summary
Functions
iex> var = quote do [x] end iex> Analyzer.parse(var) [var: {:x, [], AnalyzerTest}]
Check if expressions can be optimzed.
Link to this section Functions
Link to this function
listing_literal(term, acc)
Link to this function
parse(args)
iex> var = quote do [x] end iex> Analyzer.parse(var) [var: {:x, [], AnalyzerTest}]
Link to this function
polynomial_map(ast)
Link to this function
supported?(var)
Check if expressions can be optimzed.
When the expression is enable to optimize, {:ok, map} is returned. The map is shape following: %{args: , operators: }.
iex> var = quote do x end ...> Analyzer.supported?(var) [var: {:x, [], AnalyzerTest}]
iex> quote do ...> fn x -> x + 1 end ...> end |> Analyzer.supported? [func: %{args: [{:x, [], AnalyzerTest}, 1], operators: [:+]}]