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 previous post we used our first pure Erlang function from Elixir:
Before inventing the wheel in your own Module, first seach for that functionality in Erlang Module
Elixir is static language because it requires compilation before execution. But it is possible to execute an Elixir function in runtime using
Kernel.apply 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 atom
- how to dynamically execute Elixir function