How To Run Pure Erlang Functions In Elixir — Tentamen Software Testing Blog
In the previous post, we presented how to run modules and functions in runtime. Elixir is integrated with Erlang. Today we present how to run pure Erlang functions from Elixir. This post is part of the functional language series, and it is based on the remarkable book Elixir In Action by Sasa Juric.
Pure Erlang Function
In the previous post we used our first pure Erlang function from Elixir:
Before inventing the wheel in your own Module, first, search for that functionality in Erlang Module
Elixir is a static language because it requires compilation before execution. But it is possible to execute an Elixir function in runtime using
Kernel.apply the function. You will see a lot of this function in stack traces, during the development of your future applications.
- find Erlang Module
- use its name as an atom
- how to dynamically execute Elixir function
Originally published at https://blog.tentamen.eu on November 11, 2020.